AW: [jdom-interest] How to parse this xml?

Benjamin Broll benjamin.broll at massp.com
Sun Nov 12 12:07:08 PST 2000


Hi,

your XML file is just formatted the wrong way so that it works with your
code.

Try this document:

***************************************************
<?xml version="1.0"?>

<computer>
	<type name="Personal Computer">
      	<subtype>Dell</subtype>
        	<subtype>Acer</subtype>
        	<subtype>Samsung</subtype>
	</type>
	<type name="MiniComputer">
		<subtype>MC1</subtype>
      	<subtype>MC2</subtype>
      	<subtype>MC3</subtype>
	</type>
</computer>
***************************************************

You find the name of the type as an attribute so you have to adjust your
code a little.

Regards,

.bbr





More information about the jdom-interest mailing list