访问SimpleXMLElement数组

时间:2013-05-29 11:00:36

标签: php xml simplexml

我有:

$a = new SimpleXMLElement($myString);

$ a包含:

$a
: object(SimpleXMLElement) = 
  HEADER: object(SimpleXMLElement) = 
    LOG: object(SimpleXMLElement) = 
    PARAMS: object(SimpleXMLElement) = 
  CONTENT: object(SimpleXMLElement) = 
    LOT: object(SimpleXMLElement) = 
      DEGREES: object(SimpleXMLElement) = 
        @attributes: array = 
          value: string = 30

 $a->CONTENT->LOT->DEGREE[@value]; 

得到我:

: object(SimpleXMLElement) = 
  0: string = 30

我怎么能得到30?

0 个答案:

没有答案