comp • gb.xml • xmldocument

XmlDocument (gb.xml)

This class is
Dim hXmlDocument As XmlDocument
creatable
.

Properties

Methods
property All As XmlNode Returns an array with every XmlNode
All  
Returns the full content of the document.
Content  
Returns or defines the root element of this document.
Root  
Creates a new element TagName and returns it as an XmlElement
CreateElement  
Removes all the content of this document, and loads its new contents from the given XML string.
FromString  
Function GetElementsByNamespace ( Namespace As String [ , Mode As Integer, Depth As Integer ] ) As XmlElement
GetElementsByNamespace  
Returns all the elements of the document whose tag name matches Name.
GetElementsByTagName  
Removes all the content of this document, and loads its new contents from the given HTML string.
HtmlFromString  
Removes all the content of this document, and loads its new contents from the given file.
Open  
Saves the content of the document to FileName.
Save  
Formats the current document to a string, which can be later re-parsed.
ToString  
A synonymous of the Save function.
Write  

Examples

Use "gb.xml" 'For Gambas Scripting Only

Dim doc As New XmlDocument

doc.Root = doc.CreateElement("Info")
With doc.Root
  .NewElement("Name", "Gambas")
End With

Print doc.ToString(True)
<?xml version="1.0" encoding="UTF-8"?>
<Info>
 <Name>
  Gambas
 </Name>
</Info>