I'm using stax to parse my document, here is a dummy example of my XML document :
<data>
<video>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</video>
<book id="1">
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
<book id="n">
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
//insert new node here
</data>
How can I insert node after nth book(where n is any number). THank you