php Programming Glossary: nodetoremove
PHP - Delete XML Element http://stackoverflow.com/questions/1153697/php-delete-xml-element figure out which ones you want assign it to a variable ie nodeToRemove nodeToRemove null foreach list as domElement attrValue domElement.. ones you want assign it to a variable ie nodeToRemove nodeToRemove null foreach list as domElement attrValue domElement getAttribute.. getAttribute 'time' if attrValue 'VALUEYOUCAREABOUT' nodeToRemove domElement will only remember last one but this is just an example..
remove element from xml http://stackoverflow.com/questions/3317854/remove-element-from-xml list thedocument getElementsByTagName 'title' nodeToRemove null foreach list as domElement attrValue domElement nodeValue.. attrValue domElement nodeValue if attrValue 'Title 4' nodeToRemove domElement if nodeToRemove null thedocument removeChild.. if attrValue 'Title 4' nodeToRemove domElement if nodeToRemove null thedocument removeChild nodeToRemove doc saveXML it..
|