freelanceprogrammers.org Forum Index » Perl
Parsing CDATA section using XML::DOM:Parser
Joined: 25 Jun 2004
Posts: 1
Parsing CDATA section using XML::DOM:Parser
Hello,
I am trying to write a script that can parse CDATA section of an xml
document. The element where the CDATA section lives is called
AttData and there are several of them I need to read thru.
I am using XML::DOM::Parser (But not sure if this module has the
ability to parse CDATA sections).
Below is what I have so far (my xml string is $res)
=====START CODE====
my $parser = new XML::DOM::Parser;
my $doc = $parser->parse($res);
my $nodes = $doc->GetElementsByTagName("AttName");
my $n = $nodes->getLength;
for (my $j = 0; $j < $n; $j++) {
my $node = $nodes->item($j);
I am stuck :(
======END CODE=====
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







