Jump to content

Searching particular data in XML file


himanshuweb2

Recommended Posts

Hi,

I want to search particular data (using empid as the primary key) in a long XML file:(following is just 2 elements of that xml file, it contains 1000s of records)

 

Example:

 

<company>

<employee>

<empid>109</empid>

<fname>John</fname>

<lname>Graph</lname>

<age>28</age>

</employee>

<employee>

<empid>110</empid>

<fname>Anna</fname>

<lname>Laoe</lname>

<age>32</age>

</employee>

</company>

 

 

I want to fetch a particular record (using PHP), and populate it in textbox. The end user can then update the selected record. Then the data should be stored back to the original XML file.

 

Also if the end-user wishes to delete the particular record that record should be deleted through the XML file.

 

Regards,

Himanshu

Link to comment
https://forums.phpfreaks.com/topic/123648-searching-particular-data-in-xml-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.