Jump to content

Parsing XML Format


total noob

Recommended Posts

Hello Guys

 

Does anyone knows how to parse an XML format? Im just learning how to parse a CSV string but now my job suddenly involves parsing an XML string..

 

Can you help me on this guys?

 

This is my XML string..

<?xml  version="1.0"  encoding="UTF-8"?><GetSMSInboundResponse><Transaction><Code>1</Code><Description>Transaction  OK</Description></Transaction><SMSInbounds><InboundSMS><ID>3126274</ID><Originator>+639105701066</Originator><Destination>+447537404702</Destination><Keyword>UCB2</Keyword><Date>2012-01-24</Date><Time>12:31:11</Time><Body>UCB2  a  text  having  'qoute'  "double  qoute"  and  ,commas,  hehe.</Body></InboundSMS></SMSInbounds></GetSMSInboundResponse>

 

the result is similar to this

Array

(

    [1] => Array

        (

            [1] => UCB2

            [2] => 2012-01-24

            [3] => 12:31:11

            [4] => UCB2  a  text  having  'qoute'  "double  qoute"  and  ,commas,  hehe.

        )

 

)

 

I would like to put the result on an array or a multi dimentional array..  I dont have any ideas about XML parsing i myself is having trouble of parsing a CSV string

 

 

I would love to hear you comments or solution to my problem. Any help will be appreciated...

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/255673-parsing-xml-format/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.