C# Class System.Xml.Xsl.Runtime.XmlMergeSequenceWriter

An implementation of XmlSequenceWriter that converts an instance of the XQuery data model into a series of calls to XmlRawWriter. The algorithm to do this is designed to be compatible with the rules in the "XSLT 2.0 and XQuery 1.0 Serialization" spec. Here are the rules we use: 1. An exception is thrown if the top-level sequence contains attribute or namespace nodes 2. Each atomic value in the top-level sequence is converted to text, and XmlWriter.WriteString is called 3. A call to XmlRawWriter.WriteWhitespace(" ") is made between adjacent atomic values at the top-level 4. All items in the top-level sequence are merged together into a single result document.
Inheritance: XmlSequenceWriter
Afficher le fichier Open project: gbarnett/shared-source-cli-2.0

Méthodes publiques

Méthode Description
EndTree ( ) : void

End construction of a new Xml tree (document or fragment).

StartTree ( XPathNodeType rootType, IXmlNamespaceResolver nsResolver, XmlNameTable nameTable ) : XmlRawWriter

Start construction of a new Xml tree (document or fragment).

WriteItem ( XPathItem item ) : void

Write a top-level item by reference.

XmlMergeSequenceWriter ( XmlRawWriter xwrt ) : System

Constructor.

Private Methods

Méthode Description
CopyNamespaces ( XPathNavigator nav, XPathNamespaceScope nsScope ) : void

Copy all or some (which depends on nsScope) of the namespaces on the navigator's current node to the raw writer.

CopyNode ( XPathNavigator nav ) : void

Copy the navigator subtree to the raw writer.

CopyShallowNode ( XPathNavigator nav ) : bool

Begin shallow copy of the specified node to the writer. Returns true if the node might have content.

WriteString ( string value ) : void

Write the string value of a top-level atomic value.

Method Details

EndTree() public méthode

End construction of a new Xml tree (document or fragment).
public EndTree ( ) : void
Résultat void

StartTree() public méthode

Start construction of a new Xml tree (document or fragment).
public StartTree ( XPathNodeType rootType, IXmlNamespaceResolver nsResolver, XmlNameTable nameTable ) : XmlRawWriter
rootType XPathNodeType
nsResolver IXmlNamespaceResolver
nameTable XmlNameTable
Résultat XmlRawWriter

WriteItem() public méthode

Write a top-level item by reference.
public WriteItem ( XPathItem item ) : void
item XPathItem
Résultat void

XmlMergeSequenceWriter() public méthode

Constructor.
public XmlMergeSequenceWriter ( XmlRawWriter xwrt ) : System
xwrt XmlRawWriter
Résultat System