Forum Discussion
I’m wondering if there’s a way to make the XML Generator and the XML Formatter ignore escaped codes and leave them as they are instead of rendering them. It would be nice if ®/&174 behaved the same way as < and >
Thanks for helping me look at this!
I still need to investigate this. For the Formatter, do you check the “Format as canonical XML” checkbox?
- alex_panganiban5 years agoContributor
Hi, no I am not checking “Format as canonical XML.” I do check “Strict XSD Output.”
Here are my results of testing entity reference escaping.
XML Generator (Escape Special Characters: unchecked) Input: ® Output: Registered Sign (decimal code point: 174, utf-8 hex bytes: C2 AE) ... XML Formatter: Input: Registered Sign Output: Registered Sign
Running pipeline with “escape” checked.
XML Generator (Escape Special Characters: checked) Input: ® Output: &#174; ... XML Formatter: Input: ® Output: &#174
As you know, if we try to use the ® reference, XML Generator will fail with “SAXParseException The entity ‘reg’ was referenced, but not declared”. However, if check “escape special chars”, I get this.
XML Generator (Escape Special Characters: checked) Input: ® Output: &reg; ... XML Formatter: Input: ® Output: &reg;
Admittedly, the escaping and transformations are a bit tricky in spots. I assume you would like to see
®
or®
output from the XML Formatter? I can attach my sample pipeline after updating wsdl endpoint if helpful. Where is it failing for you and what you would like to see.