How to modify an XML file using DOM
Posted: Wed Oct 22, 2008 1:34 pm
Hello guys, I have an XML file, with the following structure:
<?xml version="1.0"?>
<parameters>
<param>
<name>site</name>
<type>text</type>
</param>
<param>
<name>filetype</name>
<type>text</type>
</param>
<param>
<name>intitle</name>
<type>text</type>
</param>
<parameters>
And foreach <param> label I need to insert a new label called <alias> someting like:
<param>
<alias>filetype</alias>
<name>filetype</name>
<type>text</type>
</param>
And, by default, the value for "alias" will be the same as the value inside "name"
Could someone help with this??
thanks,
<?xml version="1.0"?>
<parameters>
<param>
<name>site</name>
<type>text</type>
</param>
<param>
<name>filetype</name>
<type>text</type>
</param>
<param>
<name>intitle</name>
<type>text</type>
</param>
<parameters>
And foreach <param> label I need to insert a new label called <alias> someting like:
<param>
<alias>filetype</alias>
<name>filetype</name>
<type>text</type>
</param>
And, by default, the value for "alias" will be the same as the value inside "name"
Could someone help with this??
thanks,