Test
@@ -1148,6 +1149,21 @@ describe('XMLParser', () => {
);
});
+ it('Ignores processing instructions as comments when parser mode is XML.', () => {
+ const root = new XMLParser(window, { mode: XMLParserModeEnum.xmlDocument }).parse(
+ `
+
`
+ );
+
+ expect(new XMLSerializer().serializeToString(root)).toBe(
+ `
`
+ );
+ });
+
it('Handles namespaced XML', () => {
const root = new XMLParser(window, { mode: XMLParserModeEnum.xmlDocument }).parse(
`
@@ -1163,7 +1179,7 @@ describe('XMLParser', () => {
);
expect(new XMLSerializer().serializeToString(root)).toBe(
- `
+ `
Rob
37