Register  Login       Search  
Products » eXml  
 
  
     
 
eXml - Extended ASP.NET Xml Web Server Control  eXml - Extended ASP.NET Xml Web Server Control     
 
Introduction | Download and Installation | Usage | EXSLT | Friendly XML View | XInclude | xml-stylesheet PI and Embedded Stylesheets | Stripping Whitespace | Feedback
 
Show as single page

eXml is an ASP.NET 2.0 Web server control extending and improving standard ASP.NET XML Web server control. eXml Web server control uses new .NET 2.0 XSLT processor - XslCompiledTransform class to perform XSL transformations thus providing in average 400% performance boost and improved standard compliance. Additionally eXml Web server control provides built-in support for 70+ EXSLT extension functions, XML Inclusions (XInclude) 1.0, friendly XML rendering, <?xml-stylesheet?> XML processng instruction, embedded stylesheets and conditional whitespace stripping.

eXml Web server control reads XML (optionally resolving XIncludes and stripping insignificant whitespace) and writes it in a bare or friendly form into a Web Forms page at the location of the control. If an XSL Transformations (XSLT) is applied to the XML, the resulting transformed output will be rendered in the Web Forms page.

You can use eXml Web server control to write an XML document in a bare unformatted form or in a friendly syntax-colorized form, or the results of an XSL Transformation (XSLT) into a Web page.

The XML and the XSLT documents can be provided as external documents, or you can include the XML data inline. There are two ways to reference external documents using property settings in the eXml Web server control: you can provide a path to the XML document in the control tag, or you can load the XML and XSLT documents as objects and then pass them to the control. If you prefer to include the XML data inline, write it between the opening and closing tags of the control.

The XML document to display can be specified by setting one of three properties: Document, DocumentContent and DocumentSource. You can display an XML document loaded in memory, an XML in a string, or an XML file by setting the appropriate property. The following table lists the properties for specifying the XML document:

Property

Description
Document Sets the XML document using an object implementing the IXPathNavigable interface. This can be XmlDocument, XmlDataDocument, XPathDocument or XPathNavigator.
DocumentContent

Sets the XML document providing XML content in a string. This property is commonly set declaratively by placing XML text between the opening and closing <xmllab:eXml> tags of the eXml control.

DocumentSource

Sets the XML document using a path to an a file.

Note: if you don't set the XML document using any of above properties, eXml Web server control prosuces no output. If more than one XML document property is set, the last one set takes precedence and others are ignored.

When ShowFriendlyXml property is set to true, eXml Web server control renders the XML document in a pretty formatted syntax-colorized swappable/expandable form, equivalent to the one used by Internet Explorer when displaying XML documents.

If you want to display XSL transformation result you can optionally set XSLT stylesheet to be applied to the Xml document using Transform or TransformSource properties.

Note that standard ASP.NET XML Web server control uses obsolete System.Xml.Xsl.XslTransform class to perform transformations, while eXml Web server control uses new System.Xml.Xsl.XslCompiledTransform class.

Property Description
Transform Transforms the XML document using the specified System.Xml.Xsl.XslCompiledTransform object.
TransformSource Transforms the XML document using the specified XSLT stylesheet file.

Note: if you don't set any of above properties, no XSL transfomation occurs and eXml Web server control renders the XML document in a bare unformatted form or in a friendly syntax-colorized form. If you set both Transform and TransformSource properties, the last one set takes precedence and another one is ignored.

The eXml Web server control also provides TransformArgumentList property, which allows you to provide XSLT parameters or extnsion objects to the transformation.

Additional eXml Web server control properties are listed in the following table:

Property Description
EnableEXSLT Enables support for 70+ EXSLT and EXSLT.NET extension functions. True by default.
EnableXmlStylesheetPI

Enables support for the <?xml-stylesheet?> XML processing instruction, which allows to apply XSLT stylesheet referenced within the XML document.

False by default for compatibility with standard ASP.NET XML Web server control.

ShowFriendlyXml

When no XSLT stylesheet is provided, setting this property to true makes eXml Web server control to render the XML document in a pretty formatted syntax-colorized swappable/expandable form, equivalent to the one used by Internet Explorer when displaying XML documents.

False by default for compatibility with standard ASP.NET XML Web server control.

XsltSettings

Specifies the XSLT features to support during the XSL transformation. See System.Xml.Xsl.XsltSettings class documentation for more info.

Default value is XsltSettings.Default, which means that no XSLT scripts or document() function calls are allowed. You have to set this property explicitly in code to allow these features.

StripWhitespace Defines whether to strip non-significant whitespace from the XML data.


Introduction | Page 1 of 9 | Download and Installation