I am using libxml/xmlparser.h library in my program to parse the xml file. Is there any function in that library that can remove a node from the xml file?
I want to completely remove the node, i.e. its attributes and properties also.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way to do this is to parse the file in memory into a tree (either explicitly or implicitly), remove the node an question and then overwrite the file contents with the new tree. XML is NOT a database with the concept of records you can delete from permananet storage at will.