# Extracting XML Data

**URL:** <https://forum.kirupa.com/t/extracting-xml-data/209779>\
**Category:** flash\
**Created:** [December 12, 2006, 11:55am UTC](https://forum.kirupa.com/t/extracting-xml-data/209779 "2006-12-12T11:55:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![triaz](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@triaz](https://forum.kirupa.com/u/triaz)\
**Post date:** [December 12, 2006, 11:55am UTC](https://forum.kirupa.com/t/extracting-xml-data/209779/1 "2006-12-12T11:55:52Z")

</div>

Hi,

I have the following XML structure:

```auto
 
<?xml version="1.0" encoding="UTF-8"?>
<page>
<component>
<bespoke>
<text-block id="varTitle">
<p>Products</p>
</text-block>
<text-block id="var0">
<p>Welcome to My Products.</p>
<p>Another paragraph</p>
<p>Yet Another paragraph</p>
</text-block>
<text-block id="var1">
<p/>
</text-block>
<text-block id="var2">
<p>In this section you'll find out:<br></p>
<ul>
<li>
<p>Which Products are sold globally</p>
</li>
<li>
<p>Which product options are available </p>
</li>
<li>
<p>Why the product is the ultimate in technology</p>
</li>
<li>
<p>How our excellence has been rewarded</p>
</li>
</ul>
</text-block>
</bespoke>
</component>
</page>

```

When I extract the data I need to preserve the html tags

,

 and - This is what I have at the moment:
