Dear Monks, How do i extract the CDATA section in an XML document using XML::DOM::Parser.In the enclosed XML i just need to extract the CDATA part and print it .Any help or pointers will be really appreciated Thanks Natarajan Sample XML -------
<?xml version="1.0" encoding="UTF-8" ?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:// +www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:e3 xmlns:ns1="urn:foo"> <![CDATA[ <?xml version="1.0" encoding="UTF-8"?> <CdmXML version="1.1"> <header> <sche +maType> CiscoDeviceManagement</schemaType> </header> <body> <deviceList type=" +saveall" method="console"> <device> <deviceInfo deviceId="10519" deviceName="fplab-9216a" deviceI +P="172.24.111.5" terminalServerName="fplab-2511a" terminalServerIP="172.25.24.245" term +inalServerPort="2001" /> <job type="saveall" method="console" /> <result status="SAVE ALL STARTED" m +essage="" /> <additionalAttribute labTypeName="Building 13" solName="srid_tes t0801 +" userId="sridkris" genlab_cltSolId="1373" need_config="true" cityName="San Jose (US)" lls +Password="$uNeVa1e" solutionId="8254" llsIP="None" intTypeNo="900 0" configSupported="true +" llsExtDevTypeName="UNIX" scheduleId="40179" llsUserNam e="labview" extTypeName="9XXX" need_firm +ware="false" cltSolId="8414" llsCorporat eIP="171.71.176.94" /> </device> </deviceList> </body> </C +dmXML> ]]> </ns1:e3> </soapenv:Body> </soapenv:Envelope>

In reply to "CDATA Parsing and XML" by Anonymous Monk

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.