You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2006/10/14 22:28:49 UTC

RE: reading xml elements names

If object.getDefaultEmailAddress() is what you use to get the value of
the DataObject, then

object.newCursor().getName() will return the name of the element
("defaultEmailAddress").

Radu

-----Original Message-----
From: Siva [mailto:sivanb@techmahindra.com] 
Sent: Friday, September 22, 2006 2:35 AM
To: user@xmlbeans.apache.org
Subject: reading xml elements names


hi
I am trying to create a HashMap of key-value pairs by reading the XML
file using xmlbeans sample of the xml file is...
<name>amit</name>
<defaultEmailAddress>amit@yahoo.com</defaultEmailAddress>
...
I am able to get the values of the elment using the Document interface
generated by scomp utility...
ie i am able to extract 'amit' 'amit@yahoo.com' from the DTOs..
but i also want to extract the names of the elements ie 'name' and
'defaultEmailAddress' from the DTO/XML, so that i can populate my
hashmap - 'name' as the key and 'amit' as the value and soon...
Need some help on it!!
siva
--
View this message in context:
http://www.nabble.com/reading-xml-elements-names-tf2316814.html#a6443986
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org