XML insertion
Posted: Wed Nov 22, 2006 4:45 am
feyd | Please use
I need to develop a function in php where I pass the following parameters:
filename (XML file name abc.xml)
rajiv (record to be changed <name>)
mail (field name to be inserted <mail>)
rajiv@plus2net.com (value to be inserted)
Say, I am naming the function as[/syntax]
When I execute this function the details of employee rajiv in above xml file should change as
Kindly help me urgently.
With regards
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have many XML files with the following structure.
[syntax="xml"]
<employees>
<employee>
<name>Rajiv</name>
<telephone>1234</telephone>
</employee>
<employee>
<name>Waltai</name>
<telephone>2113</telephone>
</employee>
</employees>
filename (XML file name abc.xml)
rajiv (record to be changed <name>)
mail (field name to be inserted <mail>)
rajiv@plus2net.com (value to be inserted)
Say, I am naming the function as[/syntax]
Code: Select all
insert("abc.xml","rajiv","mail","rajiv@plus2net.com")Code: Select all
<employee>
<name>Rajiv</name>
<telephone>1234</telephone>
<mail>rajiv@plus2net.com</mail>
</employee>
With regards
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]