Special characters in exported XML

Special characters in exported XML

door Heinz Mutzner -
Aantal antwoorden: 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

Gemiddelde van de beoordelingen:  -
Als antwoord op Heinz Mutzner

Re: Special characters in exported XML

door Jon Bolton -
Foto van Particularly helpful Moodlers Foto van 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.

Gemiddelde van de beoordelingen:  -