Thank you for ur help Cezar, cool name btw :)
Just for anyone looking for this
XmlObject xObj = d.getwhatever();
XmlCursor cursor = xObj.newCursor();
QName qName = cursor.getName();
String elementName = qName.getLocalPart();
Shahzad Qureshi
Systems Analyst/Programmer
CIOB
Environment Canada
[EMAIL PROTECTED]
-----Original Message-----
From: Cezar Andrei [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2008 10:39 AM
To: [email protected]
Subject: RE: read the tag name text
Shahzad,
XmlCursor API gives access to low lever info/actions on the document.
XmlObject xobj = .
XmlCursor cursor = xobj.newCursor();
//cursor can be moved to the right place
// get name of the current element/attribute QName qname = cursor.getName();
Cezar
________________________________________
From: Qureshi,Shahzad [Ontario] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 1:22 PM
To: [email protected]
Subject: read the tag name text
Hi all,
I've xml similar to the following
<elements>
<temperature>
<value>123</value>
</temperature>
<precipitation>
<value>123</value>
</precipitation>
</elements>
I want to be able to read the text "temperature" or "precipitation".
I can do elements.getElementsArray() and that gives me an array size of 2 and
then I can get my value by specifiying if I want the value for temperature or
precipitation but is there a way I could read the actual tag text?? I need that
to set a variable in this another object thanks Shahzad Qureshi Systems
Analyst/Programmer CIOB Environment Canada [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]