The PTC Community email address has changed to firstname.lastname@example.org. Learn more.
When serializing a XML node with
var strTxt = formatting.currentXMLNode.serialize(true,false);
some characters are converted into entities or &#xx;
When a node contains these entities, in a XML context, for example,
<p>A & B</p>
it will be formatted as A & B.
But, if a string containing <p>A & B</p> is output using formatting.output(), & will not be displayed as &.
var strTxt = "<p>A & B</p>";formatting.output(strTxt); // will show A B
It might be interesting to have a formatting.outputXML() method processing this as usual formatting does in XML context.
This new method could also process correctly the XML PI's - without having the 'Processing Instructions close with ?>' setting set to 'Permitted' (in Document preferences / XML Format).
Without this option, if strTxt contains a 'regular' XML PI, <?A3B2 tic red?> for example, the trailing ? will be displayed...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.