Escaping characters in text output
Posted: Fri Oct 17, 2008 3:50 pm
Hi,
I'm trying to convert a convert a Office XML-file into a tagged text file. The text file uses a special syntax, similar to a flat XML-file (but it's not valid XML). That means that characters such as < and > have to be escaped in the output.
"<w:t>Some <tagged> text</w:t>" is now converted into "<tag:type>Some <tagged> text<tag:>" in the output. The wanted result is "<tag:type>Some \<tagged\> text<tag:>".
Any help on how I could accomplish this is much appreciated.
Eivind
I'm trying to convert a convert a Office XML-file into a tagged text file. The text file uses a special syntax, similar to a flat XML-file (but it's not valid XML). That means that characters such as < and > have to be escaped in the output.
"<w:t>Some <tagged> text</w:t>" is now converted into "<tag:type>Some <tagged> text<tag:>" in the output. The wanted result is "<tag:type>Some \<tagged\> text<tag:>".
Any help on how I could accomplish this is much appreciated.
Eivind