Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Did you run the code? Did you read the comments? It handles nested tags, you mean a tag nested within itself, they are parsed but a level is lost. PI won't be supported. I shall endeavor to handle > in the attributes and CDATA.

I did not see XML::SAX::PurePerl in my search earlier, oh well.

The XML spec is far from the easiest thing to read. I appreciate the insight, and am filling in most of the gaps but this is going to be like perl52perl6, 100%, 80% of the time. It wasn't even the original intent. It started as just an RSS parser but seemed to handle generic XML and so It thought I'd share it. Other things to keep in mind are; I did in fact say it was lax, this is snippets not craft.

--
perl -pew "s/\b;([mnst])/'$1/g"


In reply to Re: Re: (YA) Perl XML parser by belg4mit
in thread (YA) Perl XML-like parser by belg4mit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found