I need to place a processing instruction at the beginning of every text frame. The instruction itself will contain the page number.
I already worked out a script that will bring the instruction into the document as text, but since that causes page reflow, I would rather it come in as an xml marker. (Just as an aside, the script I mentioned goes from the end of the file to the front, to prevent reflow from being an issue on page breaks.)
What is the best way to do that? I do see how to create the instruction itself: but how do I insert it in place?
Something like this?
var myXMLProcessingInstruction = myRootXMLElement.xmlInstructions.add("blah", "blah");