I return result like this.

$xmlDoc=simplexml_load_file("myXML.xml");
$search = $xmlDoc->xpath("/customer[@id='$ID']");
foreach ($search as $key => $customer) {
	echo $id = $customer["id"];
}

Is there any chance to DELETE or UPDATE above particular record without creating whole XML file again like we do in database?

Thanks

The short answer is no. You can easily delete the "record" in memory but you will need to write out the entire file to disk if you want to permanantly delete the record.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.