XmlWriter.WriteEndElement closes one element and pops the corresponding namespace scope. : XmlWriter « XML « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » XML » XmlWriterScreenshots 
XmlWriter.WriteEndElement closes one element and pops the corresponding namespace scope.
 


Option Explicit
Option Strict

Imports System
Imports System.IO
Imports System.Xml

Public Class Sample

  Public Shared Sub Main()
     Dim settings As XmlWriterSettings = new XmlWriterSettings()
     settings.Indent = true
     Dim writer As XmlWriter = XmlWriter.Create(Console.Out, settings)

     writer.WriteStartElement("order")

     writer.WriteStartElement("item")
     writer.WriteAttributeString("date""2/19/01")
     writer.WriteAttributeString("orderID""1")

     writer.WriteFullEndElement()
     writer.WriteEndElement()
     writer.Close()
    End Sub 
End Class 

   
  
Related examples in the same category
1.Append new child to the XmlWriter
2.Create XmlWriter using XmlWriter.Create method.
3.Saves the XML document to the specified XmlWriter.
4.Saves all the children of the node to the specified XmlWriter.
5.Saves the current node to the specified XmlWriter.
6.XmlWriter.Close closes this stream and the underlying stream.
7.Creates XmlWriter using the specified stream.
8.XmlWriter.Create creates a new XmlWriter instance using the stream and XmlWriterSettings object.
9.Creates a new XmlWriter instance using the specified filename.
10.Creates XmlWriter instance using the TextWriter and XmlWriterSettings objects.
11.XmlWriter.WriteBase64 encodes specified binary bytes as Base64
12.XmlWriter.WriteBinHex encodes specified binary bytes as BinHex
13.XmlWriter.WriteNode copies data from the reader to the writer
14.XmlWriter.WriteNode (XPathNavigator, Boolean)
15.XmlWriter.WriteProcessingInstruction writes out a processing instruction
16.XmlWriter.WriteString writes the given text content.
17.XmlWriter.WriteValue
18.XPathNavigator.InsertBefore returns an XmlWriter
19.XPathNavigator.PrependChild returns XmlWriter to create a new child node
20.XDocument.Save Method (XmlWriter) serializes this XDocument to an XmlWriter.
21.XDocument.WriteTo writes this document to an XmlWriter.
22.XElement.Save (XmlWriter) serializes this element to an XmlWriter.
23.XElement.WriteTo writes this element to an XmlWriter.
24.XNode.WriteTo writes this node to an XmlWriter.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.