manipulating XML
Posted: Fri Apr 09, 2004 6:38 am
Hi guys,
i was wondering how to parse XML using php and manipulate the data at the same time. I have been able to parse the xml, but i need to move data from one tag, to a different position.
eg.
<row id ="1">
<url>portal.php</url>
<display_url>http://www.devnetwork.net</display_url>
<title>php forum</title>
<description>this is a php forum</description>
</row>
<row id ="2">
<url>http://www.php.net</url>
<display_url>http://www.devnetwork.net</display_url>
<title>php forum</title>
<description>PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML</description>
</row>
How can i render this xml so that i move the display_url after the description..??
cheers.
i was wondering how to parse XML using php and manipulate the data at the same time. I have been able to parse the xml, but i need to move data from one tag, to a different position.
eg.
<row id ="1">
<url>portal.php</url>
<display_url>http://www.devnetwork.net</display_url>
<title>php forum</title>
<description>this is a php forum</description>
</row>
<row id ="2">
<url>http://www.php.net</url>
<display_url>http://www.devnetwork.net</display_url>
<title>php forum</title>
<description>PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML</description>
</row>
How can i render this xml so that i move the display_url after the description..??
cheers.