Skip to content
Advertisement

How to delete in an XML document, a specific element according to the value of the child using PHP

JavaScript

notVisibleOnline

How to delete all elements in a xml Product, if the element <onlineShopVisibility> value notVisibleOnline

I really need to delete all Product that contain <onlineShopVisibility>notVisibleOnline</onlineShopVisibility>

and save to a new file

Code so far (copied from comment)…

JavaScript

Advertisement

Answer

You’re converting each node to DOM. However you could use DOM directly.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement