C# Class Mvp.Xml.Common.XmlNodeFactory

Creates XmlNode wrapper instances for different XML APIs, for use in XML serialization.
XmlNode instances returned by this factory only support the XmlNode.WriteTo and XmlNode.WriteContentTo methods, as they are intended for use only for serialization, and to avoid XmlDocument loading for fast performance. All other members will throw an NotSupportedException.

Author: Daniel Cazzulino, blog

See: http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx and http://weblogs.asp.net/cazzu/posts/XmlMessagePerformance.aspx.
Afficher le fichier Open project: Monobjc/monobjc-tools

Méthodes publiques

Méthode Description
Create ( XPathNavigator navigator ) : XmlNode

Creates an XmlNode serializable wrapper for an XPathNavigator.

Create ( XmlReader reader ) : XmlNode

Creates an XmlNode serializable wrapper for an XmlReader.

After serialization, the reader is automatically closed.

Create ( XmlReader reader, bool defaultAttrs ) : XmlNode

Creates an XmlDocument serializable wrapper for an XPathNavigator.

After serialization, the reader is automatically closed.

Create ( object value ) : XmlNode

Creates an XmlNode wrapper for any object, to be serialized through the XmlSerializer.

Private Methods

Méthode Description
XmlNodeFactory ( ) : System

Method Details

Create() public static méthode

Creates an XmlNode serializable wrapper for an XPathNavigator.
public static Create ( XPathNavigator navigator ) : XmlNode
navigator System.Xml.XPath.XPathNavigator The navigator to wrap.
Résultat System.Xml.XmlNode

Create() public static méthode

Creates an XmlNode serializable wrapper for an XmlReader.
After serialization, the reader is automatically closed.
public static Create ( XmlReader reader ) : XmlNode
reader System.Xml.XmlReader The reader to wrap.
Résultat System.Xml.XmlNode

Create() public static méthode

Creates an XmlDocument serializable wrapper for an XPathNavigator.
After serialization, the reader is automatically closed.
public static Create ( XmlReader reader, bool defaultAttrs ) : XmlNode
reader System.Xml.XmlReader The reader to wrap.
defaultAttrs bool Whether default attributes should be serialized.
Résultat System.Xml.XmlNode

Create() public static méthode

Creates an XmlNode wrapper for any object, to be serialized through the XmlSerializer.
public static Create ( object value ) : XmlNode
value object The object to wrap.
Résultat System.Xml.XmlNode