[sf-perl] XML Parsing question
Francisco Obispo
fobispo at isc.org
Fri Mar 4 21:57:42 PST 2011
Well, if look at my code, I'm not reading the CDATA section directly, I'm just asking for the value of the 'content' tag, if it has a CDATA element in it, well, XML::LibXML will take care of it.
On the other hand, if you don't want to write using a CDATA, you can safely use the $writer->characters($string) function, which will handle the XML entities for you..
Hope that helps.
Francisco
On Mar 4, 2011, at 9:44 PM, Bill Moseley wrote:
> One question I have is what if you are asked to copy in the <result> element but don't know that some child element might have a cdata section? I guess one approach would be to use a SAX parser and look for XML_CDATA_SECTION_NODE element. I'll give that a try tomorrow.
>
Francisco Obispo
Hosted@ Programme Manager
email: fobispo at isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
Key fingerprint = 532F 84EB 06B4 3806 D5FA 09C6 463E 614E B38D B1BE
More information about the SanFrancisco-pm
mailing list