Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XMLCh and getNodeName

Reply
Thread Tools

XMLCh and getNodeName

 
 
AOyake77
Guest
Posts: n/a
 
      01-07-2005
Hello,

{ ahem! I am writing a DOM based application on Linux, using C++ (gcc
3.x.y.z) and the Xerces-C XML parser ...}

Sometimes I see code that calls an equals("some string") method on the type
returned by getNodeName or getNodeValue. Somehow this does not seem to be
correct.

Since I am trying to learn more about XMLCh and DOMNode specifically from
what I can see in the code, XMLCh is a typedef to either wchar_t or unsigned
short, depending on platform.

My question revolves around the getNodeName method, which returns an XMLCh *

const XMLCh * getNodeName () const=0
The name of this node, depending on its type; see the table above. More...

const XMLCh * getNodeValue () const=0
Gets the value of this node, depending on its type.

My question is that I sometimes see code that says

somenode.getNodeName().equals("Foo Text");

This looks all nice and dandy, but getNodeName returns an XMLCh (which
obviously has no member functions, since it is typdefed short or wchar_t).

Did getNodeName used to return a DOMString in an earlier version? And is the
above code still legal in the current DOM Implementation?

Thanks for taking time to read this.

AOyake


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert XMLCh* to std::wstring? Meal XML 3 07-20-2007 03:28 AM
XMLCh and wchar_t wolverine C++ 3 11-01-2006 01:46 PM
XML transcode - CString to XMLCh eagle_speaks@yahoo.co.uk XML 0 08-16-2005 10:12 AM
XMLCh, DOMString and getNodeName C_Vieri XML 0 01-07-2005 01:58 AM
STL & basic_string<XMLCh> link error =?ISO-8859-15?Q?R=E9mi_Peyronnet?= C++ 0 02-16-2004 10:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57