Делите путем


XmlUtil.CreateXmlDocument Method

Definition

Overloads

CreateXmlDocument()

Creates an XmlDocument object with secure default property values.

CreateXmlDocument(Stream)

Creates an XmlDocument object with secure default property values. Extracts xml from the given stream and reads it into the XmlDocument.

CreateXmlDocument(String)

Creates an XmlDocument object with secure default property values. Loads the given XML into the XmlDocument.

CreateXmlDocument(XmlReader)

Creates an XmlDocument object with secure default property values.

CreateXmlDocument(String, Boolean)

Creates an XmlDocument object with secure default property values. Loads the given XML into the XmlDocument. This overload is useful when a whitespace only element value is valid content.

CreateXmlDocument()

Creates an XmlDocument object with secure default property values.

public static System.Xml.XmlDocument CreateXmlDocument ();
static member CreateXmlDocument : unit -> System.Xml.XmlDocument
Public Shared Function CreateXmlDocument () As XmlDocument

Returns

the new XmlDocument object

Applies to

CreateXmlDocument(Stream)

Creates an XmlDocument object with secure default property values. Extracts xml from the given stream and reads it into the XmlDocument.

public static System.Xml.XmlDocument CreateXmlDocument (System.IO.Stream input);
static member CreateXmlDocument : System.IO.Stream -> System.Xml.XmlDocument
Public Shared Function CreateXmlDocument (input As Stream) As XmlDocument

Parameters

input
Stream

The XML stream to load.

Returns

the new XmlDocument object

Applies to

CreateXmlDocument(String)

Creates an XmlDocument object with secure default property values. Loads the given XML into the XmlDocument.

public static System.Xml.XmlDocument CreateXmlDocument (string xml);
static member CreateXmlDocument : string -> System.Xml.XmlDocument
Public Shared Function CreateXmlDocument (xml As String) As XmlDocument

Parameters

xml
String

The XML to load.

Returns

the new XmlDocument object

Applies to

CreateXmlDocument(XmlReader)

Creates an XmlDocument object with secure default property values.

public static System.Xml.XmlDocument CreateXmlDocument (System.Xml.XmlReader reader);
static member CreateXmlDocument : System.Xml.XmlReader -> System.Xml.XmlDocument
Public Shared Function CreateXmlDocument (reader As XmlReader) As XmlDocument

Parameters

reader
XmlReader

The XmlTextReader to get the data from.

Returns

the new XmlDocument object

Applies to

CreateXmlDocument(String, Boolean)

Creates an XmlDocument object with secure default property values. Loads the given XML into the XmlDocument. This overload is useful when a whitespace only element value is valid content.

public static System.Xml.XmlDocument CreateXmlDocument (string xml, bool preserveWhiteSpace);
static member CreateXmlDocument : string * bool -> System.Xml.XmlDocument
Public Shared Function CreateXmlDocument (xml As String, preserveWhiteSpace As Boolean) As XmlDocument

Parameters

xml
String

The XML to load.

preserveWhiteSpace
Boolean

Whether the whitespaces are to be preserved or not.

Returns

the new XmlDocument object

Applies to