# Converting XML

**URL:** <https://forum.kirupa.com/t/converting-xml/314814>\
**Category:** Uncategorized\
**Created:** [October 9, 2010, 11:30am UTC](https://forum.kirupa.com/t/converting-xml/314814 "2010-10-09T11:30:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![psychoP](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@psychoP](https://forum.kirupa.com/u/psychoP)\
**Post date:** [October 9, 2010, 11:30am UTC](https://forum.kirupa.com/t/converting-xml/314814/1 "2010-10-09T11:30:41Z")

</div>

I have some problems reading random size and construction XML files.  
Example: if u know the construction of file it is no problem, but when trying to display XML data that is unknown structure is more dif.

Any suggestions how to read such file?

I tried reading entire file into String then trying to manipulate it and have big problems:

```auto

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, getXML);

loader.load(new URLRequest("domov.xml"));

function getXML(event:Event):void {
    var xmlData:XML = new XML(event.target.data);
    var besedilo:String = xmlData;
    trace(besedilo);
}

```

XML file example:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<rss>
<channel>
    <item id="1">
        <title>DOBRODOŠLI NA NAŠI STRANI</title>
        <image>slike/domov/1.jpg</image>
        <description><![CDATA[<span class='green'>then some text that is css ormated</span> with a link <a href="http://somelink.com">click</a>.]]></description>
    </item>
    <item id="2">
        <title>POSODOBITEV</title>
        <image>slike/domov/2.jpg</image>
        <description> <![CDATA[We had something years ago.]]></description>
    </item>
</channel>
</rss>

```
