View Source
  Class XmlExtensions
  
  Extension methods for xml objects
    Inheritance
      System.Object
      
   
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    public static class XmlExtensions
   
  Methods
  
  
    View Source
  
  AttributeValue<T>(XElement, String)
  
  
  Declaration
  
    public static T AttributeValue<T>(this XElement xml, string attributeName)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XElement | xml |  | 
      
        | System.String | attributeName |  | 
    
  
  Returns
  
  Type Parameters
  
  
    View Source
  
  AttributeValue<T>(XmlNode, String)
  
  
  Declaration
  
    public static T AttributeValue<T>(this XmlNode xml, string attributeName)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.XmlNode | xml |  | 
      
        | System.String | attributeName |  | 
    
  
  Returns
  
  Type Parameters
  
  
    View Source
  
  GetXElement(XmlNode)
  
  
  Declaration
  
    public static XElement GetXElement(this XmlNode node)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.XmlNode | node |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.Linq.XElement |  | 
    
  
  
    View Source
  
  GetXmlNode(XContainer)
  
  
  Declaration
  
    public static XmlNode GetXmlNode(this XContainer element)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XContainer | element |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.XmlNode |  | 
    
  
  
    View Source
  
  GetXmlNode(XContainer, XmlDocument)
  
  
  Declaration
  
    public static XmlNode GetXmlNode(this XContainer element, XmlDocument xmlDoc)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XContainer | element |  | 
      
        | System.Xml.XmlDocument | xmlDoc |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.XmlNode |  | 
    
  
  
    View Source
  
  HasAttribute(XmlAttributeCollection, String)
  
  
  Declaration
  
    public static bool HasAttribute(this XmlAttributeCollection attributes, string attributeName)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.XmlAttributeCollection | attributes |  | 
      
        | System.String | attributeName |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    View Source
  
  RequiredAttributeValue<T>(XElement, String)
  
  
  Declaration
  
    public static T RequiredAttributeValue<T>(this XElement xml, string attributeName)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XElement | xml |  | 
      
        | System.String | attributeName |  | 
    
  
  Returns
  
  Type Parameters
  
  
    View Source
  
  ToDataString(XElement)
  
  
  Declaration
  
    public static string ToDataString(this XElement xml)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XElement | xml |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
    View Source
  
  ToXDocument(XmlDocument)
  Converts from an XmlDocument to an XDocument
Declaration
  
    public static XDocument ToXDocument(this XmlDocument xmlDocument)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.XmlDocument | xmlDocument |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.Linq.XDocument |  | 
    
  
  
    View Source
  
  ToXElement(XmlNode)
  Converts from an XmlElement to an XElement
Declaration
  
    public static XElement ToXElement(this XmlNode xmlElement)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.XmlNode | xmlElement |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.Linq.XElement |  | 
    
  
  
    View Source
  
  ToXmlDocument(XDocument)
  Converts from an XDocument to an XmlDocument
Declaration
  
    public static XmlDocument ToXmlDocument(this XDocument xDocument)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XDocument | xDocument |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.XmlDocument |  | 
    
  
  
    View Source
  
  ToXmlElement(XContainer)
  
  
  Declaration
  
    public static XmlNode ToXmlElement(this XContainer xElement)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Xml.Linq.XContainer | xElement |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Xml.XmlNode |  |