Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: XML parsing vs regex

by space_monk (Chaplain)
on May 14, 2013 at 05:35 UTC ( #1033418=note: print w/replies, xml ) Need Help??


in reply to Re^2: XML parsing vs regex
in thread XML parsing vs regex

Its an assumption, I grant you, but I think I'm on safe ground when I think that building a DOM tree out of a document, followed by an XPath search is very likely to be more time consuming than a single regex pass. ;-)

I would be curious to see how close various approaches get though, so if anyone is willing to benchmark say LibXML, XML::Twig and regex, I would like to see the results

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033418]
help
Chatterbox?
[ovedpo15]: how fast and a good way to print error if more than one out of three variables are defined? for example if there are $a $b $c. I want that if for example $a and $b are defined - print error (also for $a and $c or $b and $c)
[ovedpo15]: its easy with three "if"s or one long "if" but is there a "nice" way :)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-04-22 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?