Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating XML elements

 
lisa jane smith
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm generating an XML document. I have reached the third hierarchial level i.e.
<level_1>
. <level_2>
. . <level_3>
. <level_2>
. . <level_3>
. <level_2>
<level_1>
Now I am trying to add <level_3> siblings to the existing <level_3> elements and am getting the following exception messages:
com.ibm.xml.parser.TXDOMException: com.ibm.xml.parser.TXNodeList#insert(): Wrong
index: 1
at com.ibm.xml.parser.TXNodeList.insert(TXNodeList.java)
at com.ibm.xml.parser.Parent.realInsert(Parent.java)
at com.ibm.xml.parser.Parent.insert(Parent.java)
at com.ibm.xml.parser.Parent.appendChild(Parent.java)
at Convertor.processNodeRecursively(Convertor.java:302)
at Convertor.processNodeRecursively(Convertor.java:320)
at Convertor.main(Convertor.java:86)
What does this mean and how do I correct this so I can continue creating elements at <level_3> of the XML doc.



 
Naren
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you post the code snippet, it will be helpful.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Naren mqtips.com",
I'll have to ask you to change your display name as it doesn't comply with our naming policy.
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic