Brightsign BrightScript 3.0 Reference Manual Manual do Utilizador Página 24

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 75
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 23
19
When applied to XML, which is technically case sensitive, the Dot Operator is still case insensitive. If you wish to
perform a case-sensitive XML operation, use the member functions of the roXMLElement/roXMLList objects.
Attribute Operator
The “@” Attribute Operator can be used with an roXMLElement instance to return a named attribute. Though XML is case
sensitive, the Attribute Operator is always case insensitive. If the Attribute Operator is used with an roXMLList instance, it
will only return a value if that list contains exactly one element.
Examples
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<photos page="1" pages="5" perpage="100" total="500">
<photo id="3131875696" owner="21963906@N06" secret="f248c84625" server="3125"
farm="4" title="VNY 16R" ispublic="1" isfriend="0" isfamily="0" />
<photo id="3131137552" owner="8979045@N07" secret="b22cfde7c4" server="3078"
farm="4" title="hoot" ispublic="1" isfriend="0" isfamily="0" />
<photo id="3131040291" owner="27651538@N06" secret="ae25ff3942" server="3286"
farm="4" title="172 • 365 :: Someone once told me..." ispublic="1" isfriend="0"
/>
</photos>
</rsp>
Given the XML in the above example.xml file, then the following code will return an roXMLList instance with three entries:
rsp=CreateObject("roXMLElement")
rsp.Parse(ReadAsciiFile("example.xml"))
? rsp.photos.photo
Vista de página 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 74 75

Comentários a estes Manuais

Sem comentários