
LINK: https://www.w3schools.com/js/js_htmldom.asp -->> Eine sehr schöne Übersicht

(BEISPIEL1) Löschen eines Elementes

LINK: https://gambas-playground.proko.eu/?gist=70660470494c5a2c696eadb3605b9f23

Use "gb.xml"

Dim contents As String = "<xml>"
"<foo>"
"<p attr=\"1\">Hello</p>"
"<p attr=\"2\">Hi</p>"
"<p attr=\"3\">Greetings</p>"
"</foo>"
"</xml>"

Dim element As XmlElement
Dim doc As New XmlDocument
doc.FromString(contents)

(BEISPIEL1)

'You have to access the parent to remove an element 
'Sie müssen auf das übergeordnete Element (Parent) zugreifen, um ein (Child-)Element zu entfernen

element = doc.GetElementsByTagName("p")[1] 'Get the second p element
element.Parent.RemoveChild(element) 


Print doc.ToString(True)


