Re: How can I parse a xml file like this?

From: Date: Wed, 30 Mar 2005 11:30:26 +0000
Subject: Re: How can I parse a xml file like this?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211862@lists.php.net to get a copy of this message
牛坤 wrote: > Dear php users, > > I'll have to parse a xml file like this: > <?xml version="1.0" encoding="utf-8"?>. > <SOAP-ENV:Envelope xmlns:xsi=" >http://www.w3.org/2001/XMLSchema-instance". > xmlns:xsd="http://www.w3.org/2001/XMLSchema". > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/". > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">. > <SOAP-ENV:Header>. > <TransactionID > xmlns="http://www.monternet.com/dsmp/schemas/">00110366325534</TransactionID>. > </SOAP-ENV:Header>. > <SOAP-ENV:Body>. > <SyncOrderRelationReq > xmlns="http://www.monternet.com/dsmp/schemas/"><Version>1.5.0</Version><MsgType>SyncOrderRelationReq</MsgType><Send_Address><DeviceType>0</DeviceType><DeviceID>0011</DeviceID></Send_Address><Dest_Address><DeviceType>400</DeviceType><DeviceID>0</DeviceID></Dest_Address><FeeUser_ID><UserIDType>2</UserIDType><MSISDN></MSISDN><PseudoCode>00110046548986</PseudoCode></FeeUser_ID><DestUser_ID><UserIDType>2</UserIDType><MSISDN></MSISDN><PseudoCode>00110046548986</PseudoCode></DestUser_ID><LinkID>SP</LinkID><ActionID>1</ActionID><ActionReasonID>1</ActionReasonID><SPID>819592</SPID><SPServiceID>03010537</SPServiceID><AccessMode>2</AccessMode><FeatureStr>IA==</FeatureStr></SyncOrderRelationReq></SOAP-ENV:Body>. > </SOAP-ENV:Envelope> > > But it seems that xml_parse_into_struct doesn't work well. > Any help will be appreciated:) This is a SOAP envelope, so you need to use the many SOAP classes that are available to parse it.

« previous php.general (#211862) next »