R
Ray
Hi,
does anybody know if there is an api or framework, that can manipulate
the DOM-Tree in that manner that the xml stays valid. For example it
should handle to add a child node at the right position if the order
of xml child elements is relevant.
e.g.:
<book>
<title>XML in a Nutshell</title>
<author>Author's Name</title>
<!-- <publisher></publisher> -->
<price>39.99</price>
</book>
If I want to set a publisher the api should automatically set it at
the right position of the element (here between <author> and <price>).
The xerces api for example only offers the method 'insertBefore'.
Ideally element types e.g. int, String or ranges are to be checked
too.
I know there a java xml binding framework like castor or jaxb that can
set elements, but due to memory and performance issue because of big
xsd and xml I would like to manipulate the dom tree directly. So are
there other alternatives?
Thanks.
Regards
Ray
does anybody know if there is an api or framework, that can manipulate
the DOM-Tree in that manner that the xml stays valid. For example it
should handle to add a child node at the right position if the order
of xml child elements is relevant.
e.g.:
<book>
<title>XML in a Nutshell</title>
<author>Author's Name</title>
<!-- <publisher></publisher> -->
<price>39.99</price>
</book>
If I want to set a publisher the api should automatically set it at
the right position of the element (here between <author> and <price>).
The xerces api for example only offers the method 'insertBefore'.
Ideally element types e.g. int, String or ranges are to be checked
too.
I know there a java xml binding framework like castor or jaxb that can
set elements, but due to memory and performance issue because of big
xsd and xml I would like to manipulate the dom tree directly. So are
there other alternatives?
Thanks.
Regards
Ray