I need to insert an element in the middle of another element's text. Given here is "before" and "after" that I want
Before
<element1> This is content of element1 </element1>
After
<element1> This is <element2></element2> content of element1 </element1>
Any ideas how to achieve this....I am using Java Dom API.