You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by abhishekhp <ab...@infy.com> on 2001/10/05 06:48:27 UTC

Best way to obtain data from an XML Document object

Hi,
I have a Document type object. What is the best way to obtain the values
from this document object? These values need to be put into a class.
e.g.

<XMLMessage>
	<Individual>
		<FirstName>abc<FirstName>
		<LastName>xyz</LastName>
	</Individual>

	<Org>
		<OrgName>abc</OrgName>
		<OrgAddress>xyz</OrgAddress>
	</Org>
</XMLMessage>

I need to put values for FirstName and LastName in a class Individual
that has attributes FirstName and LastName.
Similarly, I need to put value for OrgName and OrgAddress in a class
Organisation that has attributes OrgNameName and OrgAddress.

So far, I have been using a TreeWalker interface provided with xerces
1.4.3 . However it is proving difficult when the depth of elements
increases. Is there another API, or simply a better way of obtaining
these values?

TIA,
abhishek.

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