Nima , Plz use the following API() xmlNodeListGetString(xmlDocPtr doc , xmlNodePtr list , int inline
) Get the (xmlDocPtr doc) from xmlParseFile(const
char* filename) API or xmlParseMemory(const char* buffer , int size) Get the Current (xmlNodePtr list) for ur node <pic_file>
by traversing the DOM Document Tree , until u encounter a node with xmlNodePtr->name
as same as pic_file ( Take the help of xmlStrcmp()
API ) . Say this node is xmlNodePtr pXmlNodePicFile Once u have this pXmlNodePicFile u cannot blindly use pXmlNodePicFile->content
as the TEXT Content MyPicFileName.pdf is also a child
node of the pXmlNodePicFile So pass the 1st child of pXmlNodePicFile
to xmlNodeListGetString() API like this xmlNodeListGetString(doc, pXmlNodePicFile->children , 1) Regds, Lav From: xml-bounces gnome org
[mailto:xml-bounces gnome org] On Behalf Of Nima
Tiran Hi all, I'm newbie here and got a simple question: I'm parsing an XML file and having a node like: <pic_file>MyPicFileName.pdf</pic_file> in XML file, just wondering how can I retrieve
"MyPicFileName" from this node? Thnx Nima DISCLAIMER: |