Xdocument file




















Gets the Type of the current instance. Creates a new XDocument instance by using the specified stream. Creates a new XDocument instance by using the specified stream, optionally preserving white space, setting the base URI, and retaining line information.

Creates a new XDocument from a file. Creates a new XDocument from a file, optionally preserving white space, setting the base URI, and retaining line information. Creates a new XDocument from a TextReader. Creates a new XDocument from an XmlReader. Asynchronously creates a new XDocument and initializes its underlying XML tree from the specified stream, optionally preserving white space. Creates a new XDocument and initializes its underlying XML tree using the specified TextReader parameter, optionally preserving white space.

Creates a new XDocument containing the contents of the specified XmlReader. Creates a shallow copy of the current Object. Creates a new XDocument from a string. Creates a new XDocument from a string, optionally preserving white space, setting the base URI, and retaining line information. Removes the annotations of the specified type from this XObject. Outputs this XDocument to the specified Stream. Outputs this XDocument to the specified Stream , optionally specifying formatting behavior.

Serialize this XDocument to a file, overwriting an existing file, if it exists. Serialize this XDocument to a file, optionally disabling formatting. Serialize this XDocument to a TextWriter. Serialize this XDocument to a TextWriter , optionally disabling formatting. Serialize this XDocument to an XmlWriter. Output this XDocument to a Stream.

Writes this XDocument to a TextWriter. Writes this XDocument to an XmlWriter. Write this document to an XmlWriter. Writes the current node to an XmlWriter.

Raised when this XObject or any of its descendants have changed. Raised when this XObject or any of its descendants are about to change. Gets a value indicating whether or not this XObject has line information. Gets the line number that the underlying XmlReader reported for this XObject. Gets the line position that the underlying XmlReader reported for this XObject. Selects an XElement using a XPath expression. Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver.

Returns an accessor that allows you to navigate and edit the specified XNode. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. CreateElement "Phone" ; phone2. SetAttribute "Type", "Work" ; phone2. CreateElement "Street1" ; street1. CreateElement "City" ; city. CreateElement "State" ; state. CreateElement "Postal" ; postal.

CreateElement "Address" ; address. AppendChild street1 ; address. AppendChild city ; address. AppendChild state ; address. CreateElement "Contact" ; contact. Setting PreserveWhitespace is not valid when loading from a XmlReader. The XmlReader will be configured to either read whitespace or not.

This will be the behavior regardless of whether PreserveWhitespace is set or not. The XmlReader may have a valid line information or not.

Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Load Method Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. Linq Assembly: System. Load Stream. I started with XDocument.

I use now this for xDocument. What is faster? Is not easy, maybe you have or you know an example project. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Visual C. Sign in to vote. If I have a list of Elements and I need the attributes. Element "Root"?. Element "controlRequest"?. Element "Properties"?.



0コメント

  • 1000 / 1000