Hi JD,

You're welcome. Let us know how things progress.

Cheers, jas.

On 10/25/06, Jaideep Padhye <[EMAIL PROTECTED]> wrote:
Hi Jason,

Thanks a lot for your help. Sorry for not giving the complete code example.
I just needed help in understanding what that error meant. Now I resolved
the problem with your help.

JD

Jason Stewart <[EMAIL PROTECTED]> wrote:
Hi,

The correct list for Perl questions is [email protected]

On 10/23/06, Jaideep Padhye wrote:
> Hi all,
>
> I am not too sure if this is the correct forum to post this problem. If it
> ain't, then kindly redirect me to the correct one. i am a newbie and I am
> trying to use the Xerces in my perl script using the Xml:Xerces interface.
> When I execute my script to which works on the DOM object returned from
> parser, I get file not found errors.
>
> Can't locate auto/XML/Xerces/DOMNodeList/getNodeValu.al
in
> @INC (@INC contains: blah blah.......) at /root/jd/lib/Xml.pm line 142
>
> Can't locate auto/XML/Xerces/DOMNodeList/hasChildNod.al
in
> @INC (@INC contains: blah blah.......) at /root//lib/Xml.pm line 27
>
> I got these errors by using "$node->hasChildNodes()" in my script.
>

You aren't showing enough of your perl code to figure out how $node is set.

The error tells you that $node is an instance of the class DOMNodeList
- which has no hasChildNodes() method - it is a list of nodes not a
node, you will have to iterate through the list. Methods that return a
DOMNodeList object can be forced to return a simple Perl array if you
prefer:

$dom_list_obj = $node->getChildeNodes() # return DOMNodeList object

@node_list = $node->getChildeNodes() # return Perl array of DOMNodes

calling it in a scalar context gives you the Xerces List object,
calling it in an array context gives you a Perl list.

HTH, jas.



-------------------------------------------
"A billion flies can be wrong !!
 I would rather eat lamb chops than shit "
 - Linus Torwalds
-------------------------------------------

 ________________________________
How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to