Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: parsing XML fragments (xml log files) with... a regex

by ikegami (Pope)
on Mar 23, 2011 at 18:01 UTC ( #895066=note: print w/ replies, xml ) Need Help??


in reply to Re^2: parsing XML fragments (xml log files) with... a regex
in thread parsing XML fragments (xml log files) with XML::Parser

my $data= '(?: [^<>&]+ | &\#?\w+; )+';
should be
my $data= '(?: [^<&]+ | &\#?\w+; )+';

XML allows for unescaped ">"


Comment on Re^3: parsing XML fragments (xml log files) with... a regex
Select or Download Code
Re^4: parsing XML fragments (xml log files) with... a regex
by tye (Cardinal) on Mar 23, 2011 at 18:09 UTC

    Yeah, XML got that wrong. I've never seen real XML that takes advantage of that and I always write my parsers to reject it, so I'll know if it ever happens. So far, my tiny universe of implementers of XML generators are smarter than the standard's authors on this point. :)

    - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-07-23 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls