Skip to content

GetXDocument Method ​

Definition ​

  • Namespace: JASE.Serializers
  • Assembly: JASE.Serializers.dll

Overloads ​

NameDescription
XDocument GetXDocument(string xml)Converts the input string into an XDocument object
XDocument GetXDocument(object obj, Dictionary<string, string> xmlNameSpaces = null)Converts an object to an XDocument instance.
XDocument GetXDocument(XPathNavigator navigator, bool moveToRoot = null)Converts an XPathNavigator to an XDocument object, optionally moves it to the document root

XDocument GetXDocument(object obj, Dictionary<string, string> xmlNameSpaces = null) ​

csharp
XDocument GetXDocument(object obj, Dictionary<string, string> xmlNameSpaces = null)

Converts an object to an XDocument instance.

Parameters ​

NameDescription
objThe object to be converted.
xmlNameSpacesA dictionary containing namespace prefixes and URIs to be used when serializing the object.

Returns ​

An XDocument instance representing the XML serialization of the object.

XDocument GetXDocument(string xml) ​

csharp
XDocument GetXDocument(string xml)

Converts the input string into an XDocument object

Returns ​

instance of XDocument object

XDocument GetXDocument(XPathNavigator navigator, bool moveToRoot = null) ​

csharp
XDocument GetXDocument(XPathNavigator navigator, bool moveToRoot = null)

Converts an XPathNavigator to an XDocument object, optionally moves it to the document root

Parameters ​

NameDescription
moveToRootbool value if navigator should be moved to it's root position prior to conversion (default: false)
navigatorXPathNavigator object to convert

Returns ​

instance of XDocument object