Hi just wanna know how to convert XML to XML. The reason why I want to do this is I need to further process the XML that I've fetched from the backend. I want to modify my original XML whenever client side events. Can an XSLT to this transformation, ive tried to but doesn't work, even though I try to transform it still gives me the original XML. If i cant do this they my last resort is to use DOM API in the client app to do the transformation. Thanks for your help Richard
If the modifictions on your XML is not pre-defined and are driven by user events, then it will be hard to use XSLT. Remember XSLT translates one XML to another only if you know the rules of transformation( aka the XSL or stylesheet ) before hand. Not very long ago I too was in a similar situation. The requirement was to maintain an in-memory XML that undergoes transformations driven by the user. Imagine an in-place editing of various XML nodes in no particular order. After series of such transformations ( again driven by an user event, say pressing on the "DONE" button ) the resulting document should be persisted. The ideal approach would be to use DOM. Manipulate the nodes of the tree according to your rules and when you're done, persist the DOM. The major pitfall of DOM is that it doesnot have any facility to "write" XML documents. So the trick is to generate output XML documents from a DOM tree using a dummy transformation. Hope that helps( and is clear as mud ) Let me know if you need further clarification...
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Leverager of our synergies
posted 18 years ago
Thanks for the advice I've got one more problem. You see Im using IE5 with the MSXML parser built in. I managed to manipulate my xml tree using the DOM. But I'm dont how to tell my browser to display this new XMLDOM object as xml. I've managed to display my modified xml tree but as html. Thanks...