Subject:Renaming child element name while preserving the whole document in addition to removing namespaces. Author:krishna marupeddi Date:27 May 2010 06:54 PM Originally Posted: 27 May 2010 02:20 PM
Hi, I am trying to convert a Schema to DTD and in addition to the conversion I have to rename the child element (same name as the parent element) to a different name while preserving the rest of the document.
I am able to convert a schema to DTD, but am having issues with the second part.
Here's the sample data...
---------
<CaseInformation>
..............................
<ProblemType>
<ProblemName>Hot outage</ProblemName>
<ProblemCode>D1255</ProblemCode>
<ProblemType>OverHeated</ProblemType> -- Would like to rename this element to <ProblemTypeCode>
</ProblemType>
............................
</CaseInformation>
The output should be as follows:
<CaseInformation>
..............................
<ProblemType>
<ProblemName>Hot outage</ProblemName>
<ProblemCode>D1255</ProblemCode>
<ProblemTypeCode>OverHeated</ProblemTypeCode> -- This element name is changed
</ProblemType>
............................
</CaseInformation>