Anyone know the best way to parse this XML doc with TeamSite::XMLparser:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ealist
[
<!ELEMENT ealist (ea)*>
<!ELEMENT ea (key, value*)>
<!ELEMENT key (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ATTLIST value encoding (text|hex) "text">
]
>
<ealist>
<ea>
<key>TeamSite/Metadata/title</key>
<value>Hello</value>
</ea>
<ea>
<key>TeamSite/Metadata/body</key>
<value>Goodbye</value>
</ea>
</ealist>
This is what is returned on a -l with iwextattr. I wish it did return the DTD nonsense.
All I really want in the <key> values saved to variables, ala
my $rootnode = $parser->parse($xml); # get root DCRnode objec
$title = $rootnode->('TeamSite/Metadata/body');
Any thoughts?
Lucas Cochrane
lucas.cochrane@baucanada.com