"be consistent" | |
PerlMonks |
using xml::simple with unknown xml structureby ctaustin (Sexton) |
on Jul 14, 2005 at 14:05 UTC ( [id://474874]=perlquestion: print w/replies, xml ) | Need Help?? |
ctaustin has asked for the wisdom of the Perl Monks concerning the following question:
I have an xml file whose structure basically contains one known tag, the root, and several tags within this that are not known.
I need to produce an output file from this that looks like: table name   field name   type   size   required   calc I am trying to use XML::Simple to do this. However all of the examples I have found use a XML file that has a more defined form so that you can reference specific nodes. The issue I have is that new tables are being added to, so I need be be able to loop over these items generically. I tried the following: thinking this would give me junk1, junk2, detail, and xyz but it actually doesn't return anything. It runs, but nothing is output. I thought that if I could this, I could then reference the tag elements like mnemonic and name with something like $name=$xml->{$table}->{name};.
Back to
Seekers of Perl Wisdom
|
|