Brightsign BrightScript 2 Reference Guide Manuel d'utilisateur Page 50

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 59
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 49
50
root.AddAttribute("key2","value2")
ne=root.AddBodyElement()
ne.SetName("sub")
ne.SetBody("this is the sub1 text")
ne=root.AddBodyElement()
ne.SetName("subelement2")
ne.SetBody("more sub text")
ne.AddAttribute("k","v")
ne=root.AddElement("subelement3")
ne.SetBody("more sub text 3")
root.AddElementWithBody("sub","another sub (#4)")
PrintXML(root, 0)
print root.GenXML(false)
Another Example
xml = CreateObject("roXMLElement")
xml.SetName("root")
subel1 = xml.AddBodyElement()
subel1.SetName("subelement1")
subel2 = xml.AddBodyElement()
subel2.SetName("subelement2")
Is the same as:
xml = CreateObject("roXMLElement")
xml.SetName("root")
subel1 = xml.AddElement("subelement1")
subel2 = xml.AddElement("subelement2")
roXMLList
Interfaces:
ifList (documented elsewhere)
ifXMLList
o GetAttributes() As Object
o GetText() As String
o GetChildElements() As Object
o GetNamedElements(As String) As Object
o Simplify() As Object
GetNamedElements() is used to return a new XMLList that contains all roXMLElements
that matched the passed in name. This is the same as using the dot operator on an
roXMLList.
Simplify will
Otherwise, Return an roXMLElement if the list contains exactly one
Otherwise, will return itself
Vue de la page 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 58 59

Commentaires sur ces manuels

Pas de commentaire