Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: XML::Simple - Handling inconsistency

by Jenda (Abbot)
on Jan 09, 2013 at 10:32 UTC ( #1012421=note: print w/ replies, xml ) Need Help??


in reply to Re: XML::Simple - Handling inconsistency
in thread XML::Simple - Handling inconsistency

It's possible and advised to give xml2XMLRules not one but several xml files. That way you are more likely to catch all optional tag attributes and repeatable tags. If you have a DTD it's better to use dtd2XMLRules.

<note>xml2XMLRules and dtd2XMLRules are scripts installed with the XML::Rules module. All they do is that they call the XML::Rules::inferRulesFromExample() and XML::Rules::inferRulesFromDTD() subroutines and print the inferred rules. The inferred rules instruct XML::Rules to build a minimal consistent data structure out of your XML (only tags that may be repeated are turned to arrays, only tags that may have attributes are turned to hashes etc.).</note>

There's a short writeup on this in Simpler than XML::Simple.

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^2: XML::Simple - Handling inconsistency

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012421]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-10-02 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (56 votes), past polls