# XmlElement issue (raw data ?)

**URL:** <https://forum.juce.com/t/xmlelement-issue-raw-data/2752>\
**Category:** General JUCE discussion\
**Created:** [April 18, 2008, 3:35pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752 "2008-04-18T15:35:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [April 18, 2008, 3:35pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/1 "2008-04-18T15:35:06Z")

</div>

Hi Guys,

I have an issue using XmlElement with an xml file.

I have some xml file with descriptions in it.  
In order to format the text description, we have used some html tags like  
this is a desc  
another line of desc

So far I didn’t found a way using XmlElement  
to retrieve the complete text I’m looking :  
this is a desc  
another line of desc

Any idea ?

Thanks,

---

<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:** [April 18, 2008, 3:44pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/2 "2008-04-18T15:44:23Z")

</div>

Well that   
 isn’t actually text at all, it’s a tag, so it’ll get parsed out. You’d just have to iterate the sub-elements, concatenating the text and looking for special tags like this, and doing whatever’s necessary with them.

---

<div class="post-metadata">

**Author:** ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)\
**Post date:** [April 18, 2008, 3:47pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/3 "2008-04-18T15:47:09Z")

</div>

you need to encode the HTML such that the parser isn’t trying to treat it as XML.

Just pattern replace \<\> and / to

```auto

& # 60 ;
& # 62 ;
& # 47;

```

[edit] - stupid phpbb replaced the codes with the actual characters… You’ll need to remove the spaces… :roll:

---

<div class="post-metadata">

**Author:** ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)\
**Post date:** [April 18, 2008, 3:48pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/4 "2008-04-18T15:48:18Z")

</div>

Damn, it’s been a while since I was beaten to a post by Jules like that. Such memories. 🙂

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [April 18, 2008, 3:51pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/5 "2008-04-18T15:51:57Z")

</div>

oki doki.

Thanks.

---

<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:** [April 18, 2008, 5:12pm UTC](https://forum.juce.com/t/xmlelement-issue-raw-data/2752/6 "2008-04-18T17:12:51Z")

</div>

ah - I might have been quicker, but valley’s suggestion was better than mine…
