Hello. The way I apply my code means that getNodeValue() on DOMElement
does not work correctly!
I have just joined the mailing group and done some search in bugzilla to
see if this is a known bug or what is going on?
I am using xercesc 2.1.0 in C++ and the code and my XML are very
trivial:
Alfter parsing the document I get the top element and from that an
element that I am interested in:
DOMNodeList* node =
docElement->getElementsByTagName(XMLString::transcode("Url"));
DOMNode* el = (node->item(0));
std::string vl_Child1_str =
CreateString(el->getNodeName());
std::string vl_Url_str =
CreateString(el->getNodeValue());
The node 'el' that I obtain has the correct node name and so I try to
get the node value which should be text. But getNodeValue() returns a
null pointer.
**********************************************************
I checked the source code and discovered that it seems like the
DOMNodeImpl class has the function as a virtual function but the derived
object DOMElementImpl never overrides this so you will always get a null
pointer no matter what.
**********************************************************
I have tested my XML by putting the desired url string into an attribute
and then I can easily retrieve it using getAttributes() etc.
Bugzilla didn't turn up anything that was up to date. Is this problem
known?
Should I do parsing another way that would work?
Is version 2.1.0 full of bugs and I should not be using it?
What to do?
Any comments would be appreciated, Martin.
Martin Bosticky
Software Engineer
Action Information Management Ltd.
Tel: (01225) 711200
Fax: (01225) 711222
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]