Hello,

I'am not an Xerces-c-developer,  I am just a user.  But I do really not
know, who else  I could ask about my problem, so
I'd be very lucky, if someone of you could help me.......
I give you a code-example......
first I give you the XML-source of the node, that has to be evaluated......


       <HEADLINE><![CDATA[TecDAX am Morgen: Rote Vorzeichen, LION verliert
�ber 8 Prozent]]></HEADLINE>


now comes the C++-Source-Code:
----------------------------

       // first I evaluate an XPath-expression........   
       XalanNode *context=theWrapper.getDocumentElement();
       XalanNode *result=theEvaluator.selectSingleNode(theDOMSupport,
                                                   context,
                                                  
XalanDOMString(xpathtonode).c_str());

       // now I have a XercesNode
       DOMNode* xerNode= (DOMNode*)(theWrapper.mapNode(result));
        

        // and now i want to print the text-content of the CDATA-section
       if(result->getFirstChild()->getNodeType() ==
DOMNode::CDATA_SECTION_NODE)
       {
           cout << "CDATA_SECTION_NODE\n";
           cout <<  "content:" <<
XMLString::transcode(result->getFirstChild()->getNodeValue();
       }
   
the output  of this programme is like this:
--------------------------------


        CDATA_SECTION_NODE
        content:       (<-------- NOTHING!!!!!!!     WHY???? )


you see, I can't get the content of the CData-section withe getNodeValue. I
tried everything: getTextContent(), I casted to a CharacterDataNode and tried
.getData(), nothing helped. it is , as if the CDATA-section contains
nothing.....

if I serialize the same node with a DOMWriter to a   StdOutFormatTarget the
CDATA-node  is printed.
but I need the only the content.........
it seems to me, as I do nothing wrong, am I right? what could be the reason
????????? is it due to the mapping from xalan? what are alternative ways, if
this way to get the content doesnt'work?
Please help me!!!!!

Many Thanx in advance and regards
Thomas














-- 
NEU F�R ALLE - GMX MediaCenter - f�r Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gru�, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse f�r Mail, Message, More! +++


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

Reply via email to