Acessing elements of this xml
Posted
by csU
on Stack Overflow
See other posts from Stack Overflow
or by csU
Published on 2010-03-28T15:22:23Z
Indexed on
2010/03/28
15:33 UTC
Read the original article
Hit count: 163
<wsdl:definitions targetNamespace="http://www.webserviceX.NET/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET/">
<s:element name="ConversionRate">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="FromCurrency" type="tns:Currency"/>
<s:element minOccurs="1" maxOccurs="1" name="ToCurrency" type="tns:Currency"/>
</s:sequence>
</s:complexType>
</s:element>
<s:simpleType name="Currency">
<s:restriction base="s:string">
<s:enumeration value="AFA"/>
<s:enumeration value="ALL"/>
<s:enumeration value="DZD"/>
<s:enumeration value="ARS"/>
i am trying to get at all of the elements in enumeration but cant seem to get it right. This is homework so please no full solutions, just guidance if possible.
$feed = simplexml_load_file('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL');
foreach($feed->simpleType as $val){
$ns s = $val->children('http://www.webserviceX.NET/');
echo $ns_s -> enumeration;
}
what am i doing wrong?
thanks
© Stack Overflow or respective owner