Class XmlDocumentConverter
This utility class is designed to make System.Xml.XmlDocument related conversions easier to work with.
Inheritance
Namespace: Cuemon.Xml
Assembly: Cuemon.Xml.dll
Syntax
public static class XmlDocumentConverter
Methods
| Improve this DocFromReader(XmlReader)
Converts the given System.Xml.XmlReader to an System.Xml.XmlDocument.
Declaration
public static XmlDocument FromReader(XmlReader value)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | value | The System.Xml.XmlReader to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An System.Xml.XmlDocument object. |
FromReader(XmlReader, Boolean)
Converts the given System.Xml.XmlReader to an System.Xml.XmlDocument.
Declaration
public static XmlDocument FromReader(XmlReader value, bool leaveStreamOpen)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | value | The System.Xml.XmlReader to be converted. |
System.Boolean | leaveStreamOpen | if |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An System.Xml.XmlDocument object. |
FromStream(Stream)
Converts the given System.IO.Stream to an System.Xml.XmlDocument. The stream is closed and disposed of afterwards.
Declaration
public static XmlDocument FromStream(Stream value)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The System.IO.Stream to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An System.Xml.XmlDocument object. |
FromStream(Stream, Boolean)
Converts the given System.IO.Stream to an System.Xml.XmlDocument.
Declaration
public static XmlDocument FromStream(Stream value, bool leaveStreamOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The System.IO.Stream to be converted. |
System.Boolean | leaveStreamOpen | if |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An System.Xml.XmlDocument object. |
FromString(String)
Converts the given string to an System.Xml.XmlDocument.
Declaration
public static XmlDocument FromString(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An XmlDocumentobject. |
FromUri(Uri)
Converts the given URI to an System.Xml.XmlDocument.
Declaration
public static XmlDocument FromUri(Uri value)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | value | The URI to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | An XmlDocumentobject. |