go ahead... be a heretic | |
PerlMonks |
Maximum parsing depth with XML::Parser?by ar0n (Priest) |
on Aug 06, 2000 at 05:25 UTC ( [id://26379]=perlquestion: print w/replies, xml ) | Need Help?? |
ar0n has asked for the wisdom of the Perl Monks concerning the following question:
I have an XML-file which contains different tags, among them a <txt> tag. Now what I want is to be able to tell the XML::Parser object to ignore any tags that appear within the <txt> elements. I want this because there appear html-elements within the <txt> tags, like <img src="img.png"> or <hr>, which as we all know, is not valid xml. So, is there a way for XML::Parser to not parse content below a certain depth, or better yet, ignore content within certain tags? With ignore, i mean to pass along as a Cdata string to the appropiate handler, without processing it further. I've read the whole manpage on XML::Parser, and the only thing that even comes close seems to be the Stream_Delimiter option, which on encountering a certain string stops parsing totally. Thanks. -- ar0n | Just Another Perl Joe
Back to
Seekers of Perl Wisdom
|
|