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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.