<CUSTOM>
<PART="12345-1233">AB12345</PART>
<PART="JA1234">BD1234</PART>
</CUSTOM>
A properly formed node has the following format
<TAGNAME ATTRIBUTENAME="ATTRIBUTE VALUE">Inner text here</TAGNAME>
When you say this, "How do I remove the Duplicate <INFORMATION>, <CINFO> and <CUSTOM> nodes.", each of the child nodes in each parent node must have the same number of children and all values node name, attributes and inner text must be the same, is that correct?
Dim unixTime As Integer
unixTime = (DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds
so your Information, CInfo, and Custom nodes which are from the same write process would have the same timestamp<INFORMATION time="123456789">
<CINFO time="123456789">
</CINFO>
</INFORMATION>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="FILES">
<xs:complexType>
<xs:sequence>
<xs:element name="FILETYPE">
<xs:complexType>
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element name="INFORMATION">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="NAME" type="xs:string" />
<xs:element minOccurs="0" name="TYPE" type="xs:string" />
<xs:element minOccurs="0" name="TEST" type="xs:string" />
<xs:element minOccurs="0" name="STATION" type="xs:string" />
<xs:element minOccurs="0" name="AGE" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="TIME" type="xs:time" />
<xs:element minOccurs="0" name="COMPLETE" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="ULTS" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="TESTRESULTS" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="CODE" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CINFO">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="KEY">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="NAME" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CUSTOM">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="PART">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="NAME" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="NUMBER" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ORIGINALFILE" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
<PART="12345-1233">AB12345</PART>
when linq tries to load the document having such a node it will give you a run time exception as follows
XmlException: The '=' character, hexadecimal value 0x3D, cannot be included in a name. Line 14, position 24.Please provide a XML that is Well-Formed so we can provide an acceptable solution.
If you're asking how to delete nodes (from <Information> to </Information) from the XML, which language are you writing in? VB.NET within Visual Studio version XXXX?
You cannot simply use ParentNode.RemoveChild because this would delete all such named child nodes. Somehow I think you need to resolve the issue of node identification first.
Reference: https://msdn.microsoft.com