How do I change XML files programmatically? [message #901083] |
Thu, 09 August 2012 12:21  |
Eclipse User |
|
|
|
To finish the task I am working on, I need to programmatically change the version, namespace, and schemalocation of a XML file. Does anyone know how to do that? What APIs can I use? Would very appreciate if any response!!
More specific, the file needs to be changed looks like this:
<entity-mappings version="2.0" xmlns="AAA" xmlns:xsi="..." xsi:schemaLocation="AAA .../xml/ns/persistence/orm_2_0.xsd">
</entity-mappings>
I need to programmatically change the file to a XML file as this:
<entity-mappings version="2.4" xmlns="BBB" xmlns:xsi="..." xsi:schemaLocation="BBB http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_2_4.xsd">
</entity-mappings>
You can see I need to change the value of the following elements:
- version
- xmlns
- xsi:schemaLocation
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08294 seconds