I guess I don't really understand what your asking. There are several modules capable of parsing XML. XML::Parser and XML::LibXML both have external C libraries that need to be compiled and work fine on OS X (check the Perl-XML mailing list to get the details on compiling LibXML). There are also several pure-Perl solutions. XML::SAX was previously mentioned. XML::Parser::Lite, which is included with SOAP::Lite, also works well. I would highly suggest, however, that you use an existing module rather than write your own. For what it sound's like your doing, however, you really would probably want XML::LibXSLT as well to do the conversions from XML to HTML.
However, if this project is something that you are looking to distribute as shareware or freeware of some sort, my guess is that you are thinking in the wrong direction. While I think that it is admirable to try to come up with your own XML Parser and XML to HTML conversion routines in Perl, the two have been done many times over. Writing your own bug free routines would likely be risky at best. In a case like this, I would probably point you in the direction of an all Objective-C program, where you could compile in LibExpat or LibXML, or Java, where you could include whatever Parser and XSLT routines you wish into a JAR file.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.