"Jason E. Stewart" <[EMAIL PROTECTED]> writes:
> > I then reckoned that I could (as a hack around this problem) just call
> > the "getAttributes" attributes function, and only try to retrieve the
> > node's attributes if this delivers a defined value to me (as in: "if
> > (defined($node->getAttributes())) { ...").
> > However, this doesn't work quite as expected too. It works fine for some
> > nodes (e.g. nodes of the type ELEMENT_NODE), but the program core dumps
> > on other node types (the node on which the program crashes is of a
> > "TEXT_NODE" type - could it be that that has something to do with the
> > problems?). If I instruct the program to print the results of the call
> > to getAttributes (via "$node->getAttributes()") to screen, I see that
> > the result of this call for the node on which the program crashes is
> > "XML::Xerces::DOM_NamedNodeMap=HASH(0x84a5e1c)" (which looks okay to
> > me). However, if I then try to get the number of attributes (via
> > "$node->getAttributes()->getLength()") the program dumps a core.
I cannot reproduce this in XML::Xerces-1.7:
DB<15> x $node_list[5]->getChildNodes->item(0)
0 XML::Xerces::DOM_Text=HASH(0x105ba7ac)
empty hash
DB<16> x $node_list[5]->getChildNodes->item(0)->getAttributes
0 undef
It appears that the problem was fixed in Xerces-C.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]