Brightsign BrightScript 2 Reference Guide Manual de usuario Pagina 50

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 59
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 58 59

Comentarios a estos manuales

Sin comentarios