Jump to content

Andieuk

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Andieuk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, I'm have some problems with those damn extended character. In my data to be imported XML <name>Dìvíñésñòw</name> looks like this but when the <name> tag is imported using simpleXML it turns in to this Dìvà ñésñòw, I'm guessing some form of conversion is needed the XML imports fine I just have this problem I would like the original data to be in my DB as is Dìvíñésñòw.
  2. I found the answer myself, the attributes in the posted XML had the \" in them when passed to the simplexml object. $_POST['Log'] = trim(str_replace("&", "and", html_entity_decode($_POST['Log']))); resolved my problem.
  3. I'm pretty new to this thing called XML so I have scratched my head a bit. My users are to paste a xml string in to a form for processing, my problem is that when I load the xml direct from a file data.xml on the server using $xml = simplexml_load_file('data.xml']); My data is parsed fine and all works well. When I try to use the same xml posted via a form $_POST['data'] I get an error I/O warning : failed to load external entity.The 2 code snippets I have tried to use are below $xml = simplexml_load_file($_POST['RaidString']); $xml = simplexml_load_string($_POST['RaidString']);
×
×
  • 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.