xml

How to validate XML document with XDocument class in C#

When you want to validate an XML document against a schema, by using XDocument you need to import the System.Xml.Schema namespace. In this way you can use validation classes which XDocument class doesn’t have. The imported namespace contains an Extensions class that include a Validate() method you can use on an XElement or XDocument.

Note: You can …

Learn more

How to validate an XML document with XML Schemas in VB.NET

You can validate an XML document against a schema, by using built in XmlReader’s validation features. Note: You can find more details about XML schemas from the article How to use XML Schemas in XML document.  You can follow the next steps when performing validation:

1. You need to import the System.Xml.Schema …

Learn more

How to show XML with nested grids

When you have to deal with much more complex XML structures you can show nested elements by nesting one grid control inside another. The remarkable part is that ASP.NET provides support for this approach without requiring you to write any code. The next example uses nested grids to create a list of books, with a separate …

Learn more

How to use XPath to make XML data binding

If you implement approach described in the article How to make XML nonhierarchical data binding, you can display only attributes values. You can get the text from nested elements by using XPath data binding expressions.

You can do this by using a template that defines XPath data binding expressions.  XPath data binding expressions are similar …

Learn more

How to make XML nonhierarchical data binding

If for your project hierarchical nature of XML data is not important you can ignore it. In this case, you can bind the XML data source directly to an ordinary grid control such as the Grid View, by following the next steps:

1. You should define the XML data source …

Learn more

How to transform XML with LINQ to XML in VB.NET

You can find from the articles: How to use XSL to transform XML content, How to use XslCompiledTransform class to transform XML file in VB.NET, and How to use Xml control to transform XML file to HTML output different ways to change the representation of XML. Although XSL will still continue to be used in a …

Learn more

How to transform XML with LINQ to XML in C#

You can find from the articles: How to use XSL to transform XML content, How to use XslCompiledTransform class to transform XML file in C#, and How to use Xml control to transform XML file to HTML output different ways to change the representation of XML. Although XSL will still continue to be used in a …

Learn more

How to use Xml control to transform XML file to HTML output

There are some cases when you need to combine transformed HTML output with other content and web controls. You can resolve these issues by using Xml control which displays the result of an XLS transformation in a discrete portion of a page. You can find from the articles: How to use XSL to transform XML content, …

Learn more

How to use XslCompiledTransform class to transform XML file in VB.NET

If you want to transform XML file into formatted HTML you can use combination of stylesheet and the XslCompiledTransform class (contained in the System.Xml.Xsl namespace). Note: In the next example will be used stylesheet explained in the article How to use XSL to transform XML content. The next code performs this transformation and saves the result …

Learn more

How to use XslCompiledTransform class to transform XML file in C#

If you want to transform XML file into formatted HTML you can use combination of stylesheet and the XslCompiledTransform class (contained in the System.Xml.Xsl namespace). Note: In the next example will be used stylesheet explained in the article How to use XSL to transform XML content. The next code performs this transformation and saves the result …

Learn more