The following Code does not compile
Dim BasicGroups As String() = New String() {'Node1', 'Node2'} Dim NodesToRemove = From Element In SchemaDoc.Root.<Group> _ Where Element.@Name not in BasicGroups For Each XNode In NodesToRemove XNode.Remove() Next
It is supposed to Remove any Immediate child of the rootnode which has an attribute called name whose value is Not listed in the BasicGroups StringArray.
What is the correct syntax for this task?
You probably want to move the ‘not’ part. Eg (psuedo code)