asp.net 4.0

How to search XML content with XPath in VB.NET

The GetElementsByTagName() method illustrated in the article How to search XML content with XmlDocument in VB.NET is fairly limited. It allows you to search based on the name of an element only. You can’t filter based on other criteria, such as the value of the element or attribute content. In these cases you can use XPath …

Learn more

How to search XML content with XPath in C#

The GetElementsByTagName() method illustrated in the article How to search XML content with XmlDocument in C# is fairly limited. It allows you to search based on the name of an element only. You can’t filter based on other criteria, such as the value of the element or attribute content. In these cases you can use XPath …

Learn more

How to search XML content with XmlDocument in VB.NET

You can perform a search with the XmlDocument by using  XmlDocument.GetElementsByTagName() method, which  searches an entire document tree for elements that have a specific name and returns an XmlNodeList that contains all the matches as XmlNode objects.

For example, the following code retrieves the title of each Book in the document:

 

‘ Load the XML file.

Dim XmlFile As …

Learn more

How to search XML content with XmlDocument in C#

You can perform a search with the XmlDocument by using  XmlDocument.GetElementsByTagName() method, which  searches an entire document tree for elements that have a specific name and returns an XmlNodeList that contains all the matches as XmlNode objects.

For example, the following code retrieves the title of each Book in the document:

 

// Load the XML file.

string xmlFile = …

Learn more

How to use XML Schemas in XML document

You can create any markup language by using XML due to XML standard flexibility.  This flexibility also raises a few problems.  You will not be sure that developers around the world using your XML format are following the rules. The solution is to create a formal document that states the rules of your custom markup language, …

Learn more

How to use XML Namespaces with XNamespace class in VB.NET

You can use the XNamespace class to create XML content that uses a namespace. You can find more information about XML namespaces from the article How to use XML Namespaces in XML document. When you want to use XNamespace class you should define an XNamespace object first. Then you should add this XNamespace object to the …

Learn more

How to use XML Namespaces with XNamespace class in C#

You can use the XNamespace class to create XML content that uses a namespace. You can find more information about XML namespaces from the article How to use XML Namespaces in XML document. When you want to use XNamespace class you should define an XNamespace object first. Then you should add this XNamespace object to the …

Learn more

How to use XMLTextWriter with XML Namespaces in VB.NET

You can use the XMLTextWriter class to create XML content that uses a namespace. The code lies used to illustrate the idea are taken from the article How to use XMLTextWriter to create an XML document in VB.NET, and you can find more information about XML namespaces from the article How to use XML Namespaces in XML document.

The …

Learn more

How to use XMLTextWriter with XML Namespaces in C#

You can use the XMLTextWriter class to create XML content that uses a namespace. The code lies used to illustrate the idea are taken from the article How to use XMLTextWriter to create an XML document in C#, and you can find more information about XML namespaces from the article How to use XML Namespaces in …

Learn more

How to use XML Namespaces in XML document

When XML standard was established, different XML languages (called also XML grammars) were created. These grammars are specific to certain industries, processes, and information types. In many cases it is important to extend one type of XML markup with additional business-specific elements, or to create XML documents that combine several different grammars.    XML Namespaces is a …

Learn more