cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

Allow formatting.output to process 'true' XML

Allow formatting.output to process 'true' XML

When serializing a XML node with 

 

var strTxt = formatting.currentXMLNode.serialize(true,false);

 

some characters are converted into entities or &#xx;

Char Entiry
' '
" "
> >
& &

 

When a node contains these entities, in a XML context, for example,

 

<p>A &amp; B</p>

 

it will be formatted as A & B.

 

But, if a string containing <p>A &amp; B</p> is output using formatting.output(), &amp; will not be displayed as &.

var strTxt = "<p>A &amp; 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... 

 

 

 

1 Comment
SimonTaylor
11-Garnet
Status changed to: Under Consideration

Thanks Jacques