Closed ziplokk1 closed 6 years ago
If I create my XML string and then do:
const subelement = '<SubElement attr="abc">'.replace(/\>/g, '<');
const xml = js2xmlparser.parse('Root', {Element: subelement});
console.log(xml);
it outputs '<?xml version=\'1.0\'?>\n<Root>\n <Element><SubElement attr="abc"&lt;</Element>\n</Root>'
So I cant just replace the '>' because it encodes the ampersand as &
It looks like this is an issue with the xmlcreate repo. I will open an issue there.
I've responded in the other issue you opened.
This is kind of a stupid edge case, but I need to have an XML string within an XML tag.
Example of what I need:
Example of what is output:
Is this a bug, or am I just doing something wrong here (other than the obvious XML within XML)?