Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Fastest way of XML -> perl structure

by Corion (Patriarch)
on Mar 20, 2017 at 07:47 UTC ( [id://1185227]=note: print w/replies, xml ) Need Help??


in reply to Fastest way of XML -> perl structure

If you have an XSD (or whatever structural description of the XML), you should be able to create C code from that XSD which will then in turn create the appropriate Perl structures.

There is XML::Compile, which creates Perl code from an XSD by creating more or less a top-down parser for it.

There also is XML::LibXML, but that doesn't give you a ready-to-use Perl structure.

A specialized generated C program should be quite fast and certainly faster than XML::LibXML, at least if you approach it with the idea that the incoming XML will strictly conform to your XSD and that any nonconformance will need no memory cleanup as the program is supposed to exit anyway.

  • Comment on Re: Fastest way of XML -> perl structure

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found