This is not really a typical InDesign XML workflow.
Have you imported the "xml document" into the InDesign XML tree in your InDesign document?
What scripting language are you working in?
It sounds like you want to take the XMLElement and call .placeXML() on it, placing it into the relevant text frame. Or if you only need to replace the bracketted text, you'll have to place it into a temporary story, and then move it into your target text frame.
It might help to tell us more (a lot more) about your desired workflow. Pictures are always good.