aspose file tools*
The moose likes XML and Related Technologies and the fly likes Creating XML elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Creating XML elements" Watch "Creating XML elements" New topic
Author

Creating XML elements

lisa jane smith
Greenhorn

Joined: Aug 31, 2003
Posts: 1
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

Joined: Jul 21, 2003
Posts: 23
If you post the code snippet, it will be helpful.


<a href="http://www.mqtips.com" target="_blank" rel="nofollow">MQMessenger</a> - free Java app for MQSeries
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
"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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating XML elements