This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How to insert a structure into XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to insert a structure into XML" Watch "How to insert a structure into XML" New topic
Author

How to insert a structure into XML

David Edds
Greenhorn

Joined: Dec 06, 2004
Posts: 20
Hi,

Consider I have a large XML file of the format: /a/b/c/d

I would like to insert the structure e/f/blah blah blah at a point in the existing document (for example at point c). How can I use an XSL transform to do this?

Personally (for better or worse) I have used the following XSL, where the parameter enrichment supplies the text to be inserted:



Now a further question is, rather than inserting it at a point defined in the XSL (/a/b/c) how can I make the insertion at a point as defined by parameter?

Thanks,
David
 
Have you checked out Aspose?
 
subject: How to insert a structure into XML
 
It's not a secret anymore!