XmlWriter.WriteNode Method (XPathNavigator, Boolean)
Assembly: System.Xml (in system.xml.dll)
public void WriteNode ( XPathNavigator navigator, boolean defattr )
public function WriteNode ( navigator : XPathNavigator, defattr : boolean )
Parameters
- navigator
The XPathNavigator to copy from.
- defattr
true to copy the default attributes; otherwise, false.
The following table shows the supported XPath node types for this method.
| XPathNodeType | WriteNode Behavior |
|---|---|
| Root | Writes out all the nodes irrespective of type. That is, the writer consumes the XPathNavigator and writes out all the nodes from the root node (including attributes, processing instructions, comments and so on.) |
| Element | Writes out the element node and any attribute nodes. |
| Attribute | No operation. Use WriteStartAttribute or WriteAttributeString instead. |
| Text | Writes out the text node. |
| Namespace | No operation. Use the WriteStartAttribute or WriteAttributeString method to write the namespace declaration. |
| ProcessingInstruction | Writes out the processing instruction node. |
| Comment | Writes out the comment node. |
| SignificantWhitespace | Writes out the significant white space node. |
| Whitespace | Writes out the white space node. |
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
XmlWriter ClassXmlWriter Members
System.Xml Namespace