t***@snkmail.com
2015-03-14 04:26:28 UTC
Greetings all,
Sorry if this is a stupid question but I'm new to XML and trying to
figure out how to export a XML file from my Java app.
I'm using XOM-1.2.10 and Java JRE 1.8.0_31-b13. My program (not
production quality) writes the attached stuff.xml which I believe looks
reasonable, but when I try to read it, line 73 /int kids =
record.getChildCount();///sets kids to 9. I don't understand why since I
attach 4 elements to the "record" element.
BTW, I just added the serial number to the "record" element because I
was seeing unexpected behavior. I'd like to remove it and have just
<file ...>
<record>
<field id="1stfieldName">1stvalue</field>
<field id="2ndfieldName">2nd field value</field>
<field id="3rdfieldName">3rdfield value</field>
<record>
<record>
<field id="1stfieldName">1stvalue</field>
<field id="2ndfieldName">2nd field value</field>
<field id="3rdfieldName">3rdfield value</field>
<record>
</file>
Am I on the right track or do I need to learn a lot more about XML
before I try this in the real world?
TIA for whatever advice I can get.
Sorry if this is a stupid question but I'm new to XML and trying to
figure out how to export a XML file from my Java app.
I'm using XOM-1.2.10 and Java JRE 1.8.0_31-b13. My program (not
production quality) writes the attached stuff.xml which I believe looks
reasonable, but when I try to read it, line 73 /int kids =
record.getChildCount();///sets kids to 9. I don't understand why since I
attach 4 elements to the "record" element.
BTW, I just added the serial number to the "record" element because I
was seeing unexpected behavior. I'd like to remove it and have just
<file ...>
<record>
<field id="1stfieldName">1stvalue</field>
<field id="2ndfieldName">2nd field value</field>
<field id="3rdfieldName">3rdfield value</field>
<record>
<record>
<field id="1stfieldName">1stvalue</field>
<field id="2ndfieldName">2nd field value</field>
<field id="3rdfieldName">3rdfield value</field>
<record>
</file>
Am I on the right track or do I need to learn a lot more about XML
before I try this in the real world?
TIA for whatever advice I can get.