This is the main XML structure:
<A>
<B>
<C>letter C</C>
</B>
</A>
I'd like to insert certain block xml after element B.
pub.list:appendToDocumentList operates over IData (document). To use it you need to create this document.
Is your XML structure static?
If yes create a document on IS that resembles your XML structure, then (assuming you have your XML in a string):
convert string to IData (document) using:
Use pub.list:appendToDocumentList to add new element to e.g. <B>
list
Convert document back to string using pub.xml:documentToXMLString
If no you still need to create a document in the pipeline:
and then use pub.list:appendToDocumentList:
Ultimetly if required, convert document to string using pub.xml:documentToXMLString