XmlDocument (gb.xml)

This class represents a XML document.

This class is creatable.

الخصائص
All   property All As XmlNode Returns an array with every XmlNode
Content   Returns the full content of the document.
Root   Returns or defines the root element of this document.

الطرق
CreateElement   Creates a new element TagName and returns it as an XmlElement
FromString   Removes all the content of this document, and loads its new contents from the given XML string.
GetElementsByNamespace   Function GetElementsByNamespace ( Namespace As String [ , Mode As Integer, Depth As Integer ] ) As XmlElement
GetElementsByTagName   Returns all the elements of the document whose tag name matches Name.
HtmlFromString   Removes all the content of this document, and loads its new contents from the given HTML string.
Open   Removes all the content of this document, and loads its new contents from the given file.
Save   Saves the content of the document to FileName.
ToString   Formats the current document to a string, which can be later re-parsed.
Write   A synonymous of the Save function.

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>