Gets or sets the tag format of the element. : XmlDocument « XML « VB.Net






Gets or sets the tag format of the element.

  


Imports System
Imports System.Xml

public class Sample

  public shared sub Main()

      Dim doc as XmlDocument = new XmlDocument()
      doc.LoadXml("<book>" & _
                  "  <title>C#</title>" & _
                  "  <price/>" & _
                  "</book>")   

      Dim currNode as XmlElement 
      currNode = CType (doc.DocumentElement.LastChild, XmlElement)
      if (currNode.IsEmpty)
        currNode.InnerXml="9.9"
      end if

      Console.WriteLine(doc.OuterXml)
  end sub
end class

   
    
  








Related examples in the same category

1.Create XmlDocument class.
2.XmlDocument.CloneNode
3.XmlDocument.CreateAttribute
4.XmlDocument.CreateCDataSection creates an XmlCDataSection containing the specified data.
5.XmlDocument.CreateComment creates an XmlComment containing the specified data.
6.XmlDocument.CreateDocumentFragment creates an XmlDocumentFragment.
7.XmlDocument.CreateDocumentType returns a new XmlDocumentType object.
8.XmlDocument.CreateElement creates an element with the specified name.
9.XmlDocument.CreateElement creates an element with the specified Prefix, LocalName, and NamespaceURI.
10.XmlDocument.CreateEntityReference creates an XmlEntityReference with the specified name.
11.Validates XmlDocument against the XML Schema Definition Language (XSD) schemas
12.Saves all the children of the XmlDocument node to the specified XmlWriter.
13.Saves the XmlDocument node to the specified XmlWriter.
14.Gets the XmlDocument to which this node belongs.
15.Set InnerText to a string that includes markup
16.Set InnerXml to a string that includes markup
17.Create a shallow clone.
18.Gets or sets a value indicating whether to preserve white space in element content.
19.InnerXml includes the markup of the element