Oh boy! One of those! Again! ;--)
First, let's start with the basics: no you won't write a proper XML parser using regexps. See On XML parsing for some of the things that can, and will, trip your code, and why you shouldn't call what you write an XML Parser if it isn't one.
Then why can't you install a new module?? Don't you think your time would be better spent learning how to install a module, rather than writing a half-baked sorta-XML parser? If you are worried about distributing the code to people who won't know how to install modules, most likely on Windows, then XML::Parser comes installed with Activestate Perl (it is used by ppm). Use it. Or better yet learn how to use ppm and use a better XML module. And on Unix installing modules is usually easy. If not you can always package an existing pure Perl parser with your code: XML::Parser::Lite for example, or XML::SAX::PurePerl. None of them is a complete XML parser, but they will surely be better than what you will write.
And if you prove me wrong and write a complete XML parser in pure perl, then you will get complete and unreserved apologies! (the XML::Parser distribution includes some pretty hairy tests, you can use them).
In reply to Re: XML Parsing
by mirod
in thread XML Parsing
by JoeJaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |