List Info

Thread: reading xml elements names




reading xml elements names
user name
2006-09-22 09:35:14
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>amityahoo.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' 'amityahoo.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-elemen
ts-names-tf2316814.html#a6443986
Sent from the Xml Beans - User mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: user-unsubscribexmlbeans.apache.org
For additional commands, e-mail: user-helpxmlbeans.apache.org

reading xml elements names
user name
2006-10-14 20:28:49
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:sivanbtechmahindra.com] 
Sent: Friday, September 22, 2006 2:35 AM
To: userxmlbeans.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>amityahoo.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' 'amityahoo.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-elemen
ts-names-tf2316814.html#a6443986
Sent from the Xml Beans - User mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: user-unsubscribexmlbeans.apache.org
For additional commands, e-mail: user-helpxmlbeans.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-unsubscribexmlbeans.apache.org
For additional commands, e-mail: user-helpxmlbeans.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )