J
jet.jetpac
I've tried to write an application using XML:OM in perl. I'm not able
to getNoddeValue at text node.
XML FILE:
---
<sample param="some param">
<text_node> Test data. </text_node>
</sample>
---
My perl portion:
---
#!/usr/bin/perl
use strict;
use warnings;
use XML:OM;
my $parser = XML:OM:arser->new;
my $document = $parser->parsefile("test.xml");
my $value=$document->getDocumentElement->getFirstChild->getNodeValue;
print "$value\n";
----
The problem is, that $value is not set, getNodeValue returns null,
getNodeName returns '#text'. Can anybody PLEASE tell me, what am I
doing wrong? I'm almost ill of the testing...
Thanks for any help,
Peter
to getNoddeValue at text node.
XML FILE:
---
<sample param="some param">
<text_node> Test data. </text_node>
</sample>
---
My perl portion:
---
#!/usr/bin/perl
use strict;
use warnings;
use XML:OM;
my $parser = XML:OM:arser->new;
my $document = $parser->parsefile("test.xml");
my $value=$document->getDocumentElement->getFirstChild->getNodeValue;
print "$value\n";
----
The problem is, that $value is not set, getNodeValue returns null,
getNodeName returns '#text'. Can anybody PLEASE tell me, what am I
doing wrong? I'm almost ill of the testing...
Thanks for any help,
Peter