Jump to content

Problem to retrieve form data from XML page


milfone

Recommended Posts

This is response of the form and It seems a correct XML:

  <?xml version="1.0" encoding="ISO-8859-1" ?>

- <response>

  <stato>OK</stato>

  <messaggio>Inserimento utente effettuato correttamente.</messaggio>

  <id_cliente>131852990468021</id_cliente>

  </response>

 

I'm right?

Link to comment
Share on other sites

The first time you posted the response you posted invalid XML.  Data cannot exist outside a tag, you had data outside the tag. 

 

The second time (just now) you posted nearly the exact same document and yet now the data is magically back INSIDE the tag.  Which is which?  What is happening?  Why does your output keep changing format?

Link to comment
Share on other sites

The first time you posted the response you posted invalid XML.  Data cannot exist outside a tag, you had data outside the tag. 

 

The second time (just now) you posted nearly the exact same document and yet now the data is magically back INSIDE the tag.  Which is which?  What is happening?  Why does your output keep changing format?

He typed it from memory. Or as an example. Or something like that.

 

Yes milfone, that's valid. So no problems there.

Link to comment
Share on other sites

The first time you posted the response you posted invalid XML.  Data cannot exist outside a tag, you had data outside the tag. 

 

The second time (just now) you posted nearly the exact same document and yet now the data is magically back INSIDE the tag.  Which is which?  What is happening?  Why does your output keep changing format?

The first time is just an example. So now I have to use curl or only SimpleXMLElement?

Can you send me an example code to able to retrieve XML tag?

I'm pretty much desperate I don't know what I do.

Link to comment
Share on other sites

Use both. Use cURL to send the right form data request and to retrieve the XML response, then use SimpleXML to parse the XML for the data you want.

I think will be hard to implement both function and I'm not a PHP guru, If somebody can help me I'll be glad to pay the time spent to implement the code.

So now it is impossible to me learn how to parse an XML, Curl and other method. I have to start from the beginning with PHP book, and right now I haven't enough time.

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.