First, how do I format the XML processing instruction, is it:
<?processingInstructionName attribute="value" attribute2="value2"?>
Using StAX, I then want to read it by handling the XMLStreamConstants.PROCESSING_INSTRUCTION (javadoc) event, but it only provides two methods to then retrieve information about the processing instruction from the XMLStreamReader:
getPITarget()
getPIData()
The javadoc for these two methods isn't very helpful.
- Is the XML formatting correct?
- Is this the proper way to go about
parsing processing instructions
using the StAX
XMLStreamReaderAPIs? - How do I use
getPITarget()andgetPIData()to return multiple arguments?