# XML Parser Problem

**URL:** <https://forum.juce.com/t/xml-parser-problem/1106>\
**Category:** General JUCE discussion\
**Created:** [October 3, 2006, 10:10am UTC](https://forum.juce.com/t/xml-parser-problem/1106 "2006-10-03T10:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frodo](https://avatars.discourse-cdn.com/v4/letter/f/ecccb3/32.png) [@Frodo](https://forum.juce.com/u/Frodo)\
**Post date:** [October 3, 2006, 10:10am UTC](https://forum.juce.com/t/xml-parser-problem/1106/1 "2006-10-03T10:10:43Z")

</div>

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

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

Outputting the text with JUCE 1.35:

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

which is correct.

Outputting the text with JUCE 1.38:

```auto
0x01 0x1E 0x01 0x00 0x00 0x00 0x00 0x01 0xF7
```

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

* * *

Frodo

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [October 3, 2006, 10:55am UTC](https://forum.juce.com/t/xml-parser-problem/1106/2 "2006-10-03T10:55:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Frodo](https://avatars.discourse-cdn.com/v4/letter/f/ecccb3/32.png) [@Frodo](https://forum.juce.com/u/Frodo)\
**Post date:** [October 3, 2006, 11:43am UTC](https://forum.juce.com/t/xml-parser-problem/1106/3 "2006-10-03T11:43:16Z")

</div>

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

Thank you for your help

* * *

Frodo

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [October 3, 2006, 11:53am UTC](https://forum.juce.com/t/xml-parser-problem/1106/4 "2006-10-03T11:53:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2017, 9:59am UTC](https://forum.juce.com/t/xml-parser-problem/1106/5 "2017-05-12T09:59:41Z")

</div>

Closed on May 12, 2017, 9:59am UTC


