Convert XML to TCL Object

Posted by pws5068 on Stack Overflow See other posts from Stack Overflow or by pws5068
Published on 2010-04-05T20:15:51Z Indexed on 2010/04/05 20:23 UTC
Read the original article Hit count: 245

Filed under:
|
|

Greetings,

I'm new to TCL scripting, and I have a very very basic xml file which I need to import information from into tcl.

Example of XML Document Structure:

<object>
  <type>Hardware</type>
  <name>System Name</name>
  <description>Basic Description of System.</description>
  <attributes>
      <vendor>Dell</vendor>
      <contract>MM/DD/YY</contract>
      <supportExpiration>MM/DD/YY</supportExpiration>
      <location>Building 123</location>
      <serial>xxx-xxx-xxxx</serial>
      <mac>some-mac-address</mac>
  </attributes>
</object>

Etc...

I've seen something called TCLXML but I'm not sure if this is the best route or even how to create the package to use it..

Any help will be greatly appreciated.

© Stack Overflow or respective owner

Related posts about tcl

Related posts about Xml