Special characters in exported XML

Special characters in exported XML

by Heinz Mutzner -
Number of replies: 1

When I export a glossary as XML document, it contains characters, I don't really like:  e.g. <p></p><p></p><p>

Is there an elegant way to get rid of them?

Cheers

Heinz

Average of ratings: -
In reply to Heinz Mutzner

Re: Special characters in exported XML

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

Those characters are the Unicode codes for the HTML markup tags. So &lt;p&gt; actually translates to <p> which indicates the start of a paragraph.

If you’re seeing that whole line as is, ie.

&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;

that translates to

<p></p><p></p><p>

which means you’ve got two blank lines before a piece of text in your glossary entry.

If you delete them from your XML export file, it may result in errors if you use that as an import file.

But if you’re exporting as XML just to get the entries into a document (rather than for an import), you can safely do a search and replace in a word processor.