Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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
Replies are listed 'Best First'.
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 browsing the Monastery: (13)
As of 2015-07-31 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls