XML Parser Problem

Hi Jules,

There seems to be a problem with the XML parser provided with JUCE V1.36 onwards – It’s not picking up the text from the entity references and inserting them into the XML document. For example, I have the following entity reference and piece of XML

<!ENTITY parameterChangeUniversal "0xF0 0x43 0x10 0x3E 0x7F">
.
.
.
&parameterChangeUniversal; 0x01 0x1E 0x01 0x00 0x00 0x00 0x00 0x01 0xF7

Outputting the text with JUCE 1.35:

0xF0 0x43 0x10 0x3E 0x7F 0x01 0x1E 0x01 0x00 0x00 0x00 0x00 0x01 0xF7

which is correct.

Outputting the text with JUCE 1.38:

0x01 0x1E 0x01 0x00 0x00 0x00 0x00 0x01 0xF7

which leaves out the 0xF0 0x43 0x10 0x3E 0x7F part


Frodo

Hmm. Looks like there’s a typo in juce_XmlDocument.cpp - line 603 should be:

if (entity.startsWithChar (T('<')))

Very strange that I didn’t notice that before, thanks for bringing it up!

Don’t you mean line 608? I changed line 608 and it works perfectly!

Thank you for your help


Frodo

Ah yes, I’d made a couple of other changes to my version, so the numbers are a bit off.