XMLFile.open('r'); var PIcontent = book.processingInstruction('pgw');
var readXMLFile = XMLFile.read();
var book = new XML (readXMLFile);
var PIcontent = book.processingInstruction('pgw');
This should return the content of the PI such as
<?pgw 8.5i?> which would hopefully mean that PIcontent === '8.5i'.
I thought I had found the source of the problem by using the static property
XML.ignoreProcessingInstructions = false; but although that made the PI show up in
book, it made no difference wth the handling of processing instructions.
I also tried using xpath, but again with no luck.
The cut-down XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book SYSTEM "book.dtd">
<title>Example XML fragment</title>
Thanks to anyone who may know what's going on here.