Have you tried using XMLGetError() to get the error code and message? If
you use it after each function call, you will always have the reason for
any failure encountered available to you. That should help in your
diagnosis.


Regards,

LeRoy F. Dreyfuss
Product Manager
IBM UniVerse and UniData (U2) Extended Relational Databases
IBM DB2 Information Management Software
Tel: 303-672-1254          Fax: 303-294-4832
Mobile: 720-341-4317   Tie-line -770-1254
External email:  [EMAIL PROTECTED]
WWW:  http://www.ibm.com/software/data/u2

Don't miss out on the IBM DB2 Information Management Technical Conference
September 19-24, 2004 - Las Vegas, NV



             "Rajesh Menon"
             <[EMAIL PROTECTED]
             C.com>                                                     To
             Sent by:                  <[EMAIL PROTECTED]>
             [EMAIL PROTECTED]                                          cc
             stserver.u2ug.org
                                                                   Subject
                                       [U2] XML DOM. HOW TO GET
             09/02/2004 07:34          XDOMGetNodeValue ?
             PM


             Please respond to
                 u2-users






Hello,

I am trying to read a simple XML file and get the node values using basic a
routine (uv 10.1)

XML file looks like,
<NAME>
             <FIRSTNAME>RAJESH</FIRSTNAME>
             <LASTNAME>MENON</LASTNAME>
</NAME>

The basic routine is:

STATUS = XDOMOpen(XMLFILENAME,XML.FROM.FILE,mydom)
STATUS = XDOMLocate(mydom,"NAME","",N1HANDLE)
STATUS = XDOMLocateNode(N1HANDLE, XDOM.CHILD, XDOM.FIRST.CHILD,
XDOM.ELEMENT.NODE, N2HANDLE)
STATUS = XDOMGetNodeName(N2HANDLE, MYNODENAME)
CRT "STATUS = ":STATUS:", NODE NAME ":MYNODENAME:
STATUS = XDOMGetNodeValue(N2HANDLE, MYNODEVALUE)
CRT "STATUS = ":STATUS:", NODE VALUE ":MYNODEVALUE

When I run the program, first CRT command shows "STATUS = 0 and NODENAME =
FIRSTNAME.

Second CRT shows, STATUS = -1 , NODEVALUE =

Why I am not getting any values here? What I am doing wrong?

Thanks
Rajesh
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

[demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of pic29185.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif]
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to