Was this page helpful?

XDoc Constructors

    XDoc(string tag)

    public XDoc(string tag);
    Creates a new XDoc instance with the given root tag.

    Parameters

    Name Type Description
    tag string Root tag of the new XML document. Cannot be null.

    XDoc(string tag, string ns)

    public XDoc(string tag, string ns);
    Creates a new XDoc instance with the given root tag and the given implicit namespace.

    Parameters

    Name Type Description
    tag string Root tag of the new XML document. Cannot be null.
    ns string Tag xml namespace.

    XDoc(string prefix, string tag, string ns)

    public XDoc(string prefix, string tag, string ns);
    Creates a new XDoc instance with the given root tag and the given implicit namespace.

    Parameters

    Name Type Description
    prefix string Prefix for the root tag of the new XML document.
    tag string Root tag of the new XML document. Cannot be null.
    ns string Tag xml namespace.

    XDoc(XmlDocument doc)

    public XDoc(XmlDocument doc);
    Creates a new XDoc instance from an existing XmlDocument instance.

    Parameters

    Name Type Description
    doc XmlDocument XmlDocument instance with a root element. Cannot be null.

    XDoc(XDoc doc)

    public XDoc(XDoc doc);
    Creates a new XDoc instance from an existing, non-empty XDoc instance.

    Parameters

    Name Type Description
    doc XDoc Non-empty XDoc instance. Cannot be null.

    XDoc(XmlDocument doc, XmlNode[] list, int index, XmlNode root, XmlNamespaceManager nsManager)

    protected XDoc(XmlDocument doc, XmlNode[] list, int index, XmlNode root, XmlNamespaceManager nsManager);
    Protected constructor for XDoc inheritors for creating a new instance with the state of the old instance.

    Parameters

    Name Type Description
    doc XmlDocument System.Xml.XmlDocument that this instance wraps.
    list XmlNode[] List of nodes for the current cursor into the System.Xml.XmlDocument.
    index int Index into the list of nodes providing the cursor pointer.
    root XmlNode Root of the XDoc instance.
    nsManager XmlNamespaceManager Namespace manager to use with the instance.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by