# Regarding the xml

**URL:** <https://forum.kirupa.com/t/regarding-the-xml/262363>\
**Category:** Uncategorized\
**Created:** [June 5, 2008, 12:40pm UTC](https://forum.kirupa.com/t/regarding-the-xml/262363 "2008-06-05T12:40:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raghavendra](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Raghavendra](https://forum.kirupa.com/u/Raghavendra)\
**Post date:** [June 5, 2008, 12:40pm UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/1 "2008-06-05T12:40:21Z")

</div>

Dear jabba ,  
I am raghavendra. I read your tutorial it was very easy to follow up and I need more information like i want to read the data from mysql and output in xml in this format [COLOR=#0000ff]\<?xml version=“1.0” encoding=“utf-8” ?\>[/COLOR]  
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///C:/Documents%20and%20Settings/ALIENWARE/My%20Documents/Flex%20Builder%203/Dashboard/src/data/revenue\_by\_region.xml#) [COLOR=#0000ff]\<[/COLOR][COLOR=#990000]items[/COLOR][COLOR=#0000ff]\>[/COLOR]  
[COLOR=#0000ff]\<[/COLOR][COLOR=#990000]item[/COLOR] [COLOR=#990000]region[/COLOR][COLOR=#0000ff]="[/COLOR] **North America** [COLOR=#0000ff]"[/COLOR][COLOR=#990000] value[/COLOR][COLOR=#0000ff]="[/COLOR] **148** [COLOR=#0000ff]" /\>[/COLOR]

[COLOR=#0000ff]\<[/COLOR][COLOR=#990000]item[/COLOR] [COLOR=#990000]region[/COLOR][COLOR=#0000ff]="[/COLOR] **South America** [COLOR=#0000ff]"[/COLOR][COLOR=#990000] value[/COLOR][COLOR=#0000ff]="[/COLOR] **75** [COLOR=#0000ff]" /\>[/COLOR]

[COLOR=#0000ff]\<[/COLOR][COLOR=#990000]item[/COLOR] [COLOR=#990000]region[/COLOR][COLOR=#0000ff]="[/COLOR] **EMEA** [COLOR=#0000ff]"[/COLOR][COLOR=#990000] value[/COLOR][COLOR=#0000ff]="[/COLOR] **115** [COLOR=#0000ff]" /\>[/COLOR]

[COLOR=#0000ff]\<[/COLOR][COLOR=#990000]item[/COLOR] [COLOR=#990000]region[/COLOR][COLOR=#0000ff]="[/COLOR] **APAC** [COLOR=#0000ff]"[/COLOR][COLOR=#990000] value[/COLOR][COLOR=#0000ff]="[/COLOR] **85** [COLOR=#0000ff]" /\>[/COLOR]

[COLOR=#0000ff]\</[/COLOR][COLOR=#990000]items[/COLOR][COLOR=#0000ff]\> could you able to help me out please You can mail me to my [raghavendra@kirupa.com](mailto:raghavendra@kirupa.com) or [raghavendra34@yahoo.com](mailto:raghavendra34@yahoo.com) I will be waiting for your reply[/COLOR]

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 5, 2008, 1:05pm UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/2 "2008-06-05T13:05:03Z")

</div>

Easiest way imo to do this is to have a php file echo a xml header and the xml data with values coming from a mysql connection.

---

<div class="post-metadata">

**Author:** ![Raghavendra](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Raghavendra](https://forum.kirupa.com/u/Raghavendra)\
**Post date:** [June 5, 2008, 5:22pm UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/3 "2008-06-05T17:22:25Z")

</div>

> [@sekasi;2337212](#):
>
> Easiest way imo to do this is to have a php file echo a xml header and the xml data with values coming from a mysql connection.

could you please give me some sample or explain with example…

please yar i am in urgent and trouble…

Thanking you

Raghavendra

---

<div class="post-metadata">

**Author:** ![Raghavendra](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Raghavendra](https://forum.kirupa.com/u/Raghavendra)\
**Post date:** [June 27, 2008, 8:50am UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/4 "2008-06-27T08:50:26Z")

</div>

HI,

Please help me why there is no response

---

<div class="post-metadata">

**Author:** ![Raghavendra](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Raghavendra](https://forum.kirupa.com/u/Raghavendra)\
**Post date:** [June 27, 2008, 8:51am UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/5 "2008-06-27T08:51:08Z")

</div>

HI,

Please help me why there is no response

---

<div class="post-metadata">

**Author:** ![Raghavendra](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Raghavendra](https://forum.kirupa.com/u/Raghavendra)\
**Post date:** [June 27, 2008, 8:57am UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/6 "2008-06-27T08:57:40Z")

</div>

Hi

Friends, i have same example with me that brings the mysql data to xml outputing could any one tell me how to do this …

---

<div class="post-metadata">

**Author:** ![evildrummer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/evildrummer/32/2308_2.png) [@evildrummer](https://forum.kirupa.com/u/evildrummer)\
**Post date:** [June 27, 2008, 10:03am UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/7 "2008-06-27T10:03:08Z")

</div>

^ I’ll post an example in an hour or two, but don’t keep posting same thing again.

---

<div class="post-metadata">

**Author:** ![evildrummer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/evildrummer/32/2308_2.png) [@evildrummer](https://forum.kirupa.com/u/evildrummer)\
**Post date:** [June 27, 2008, 1:19pm UTC](https://forum.kirupa.com/t/regarding-the-xml/262363/8 "2008-06-27T13:19:36Z")

</div>

```php

<?php
header('Content-type: text/xml');
?>
<?xml version="1.0" encoding="utf-8" ?>
    <items>
<?php
/* Add your MySQL Connection here [mysql_connect(etc, etc, etc)] */
$result = mysql_query('SELECT region, id FROM tbl_places');
while ($row = mysql_fetch_assoc($result)) {
        echo '<item region="'.$row['region'].'" value="'.$row['id'].'" /> ';
}
?>
    </items>

```

Hope that helps
