if(doc.SelectSingleNode("//mynode")==null)....
Should do it (where doc is your XmlDocument object, obviously)
Alternatively you could use an XSD and validate against that
More Related Contents:
- what is the difference between xml document and xml [closed]
- How can I build XML in C#?
- Reading Xml with XmlReader in C#
- SAML Assertion in a XML using C#
- What is the best way to parse (big) XML in C# Code?
- XDocument containing namespaces
- How to change XML Attribute
- The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name
- How to parse very huge XML Files in C#? [duplicate]
- Encoding XPath Expressions with both single and double quotes
- How to create an XML document using XmlDocument?
- How to modify existing XML file with XmlDocument and XmlNode in C#
- Conditional xml serialization
- C# XDocument Load with multiple roots
- Iterating through all nodes in XML file
- How to read HTML as XML?
- how to derive xml element name from an attribute value of a class using annotations?
- How to check for valid xml in string input before calling .LoadXml()
- Read Soap Message using C#
- Two-way binding of Xml data to the WPF TreeView
- Data at the root level is invalid [duplicate]
- How to get xpath from an XmlNode instance
- Case insensitive XML parser in c#
- Read from xml files with or without a namespace using XmlDocument
- Automating replacing tables from external files
- Trouble serializing and deserializing multiple objects
- How do I return XML from a Stored Procedure?
- How to add xmlnamespace to a xmldocument
- Creating a specific XML document using namespaces in C#
- How to convert JSON to XML or XML to JSON in C#?