Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6121861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:49:56+00:00 2026-05-23T15:49:56+00:00

So I have a PHP Script thats parsing an XML Response from Google Analytics.

  • 0

So I have a PHP Script thats parsing an XML Response from Google Analytics. It has been working for a few weeks, but today I’ve been getting this warning, and simple xml load string is not converting the xml response into a simplexml object.

Message: simplexml_load_string():
Entity: line 743: parser error :
Entity ‘acirc’ not defined

I have tried utf8_encoding the response before I pass it into simplexml_load_string, but it isn’t working. I believe that acirc is an encoded symbol, and that this symbol is screwing up the parser somehow?

I get the warning above twice, and then I get this one twice also:

Message: simplexml_load_string():
Entity: line 743: parser error :
Entity ‘cent’ not defined

Any advice would be a huge help, thanks!

Thanks for the comment Marc, I have tried this:

$xml = simplexml_load_string(htmlspecialchars_decode($response_body));

And I get an interesting error, but the xml object is still empty:

Entity: line 743: parser error : Input
is not proper UTF-8, indicate encoding
! Bytes: 0x84 0x26 0x63 0x65

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:49:56+00:00Added an answer on May 23, 2026 at 3:49 pm

    The string you want to create a SimpleXMLElement from is not valid XML. The simple xml function can only deal with valid XML. For anything invalid you’ll get errors and no element instead. As you played around with the data already you’ve seen some of the errors.

    The first error is just the information that your XML has undefined entities. The second error you find especially interesting for a reason I don’t understand is because you really ditched the string into some encoding nirvana. So then even the string isn’t properly encoded any longer for simplexml to deal with.

    If that response you get should really be valid XML, then file a bugreport with google, make them fix their broken output and then your issue should be solved.

    Edit:

    You copy and paste it from the browser? If so try running html_entity_decode() on it before loading it as XML. Probably you’re not loading XML but HTML. Better use DomDocument and the loadHTML function instead, no need to decode anything then.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script that needs to determine if it's been executed via
I have a little script that replace some text, that come from a xml
I have a PHP script that is parsing an RSS feed and entering the
Just say I have a file configuration.xml that a php script needs to parse
I have a few buttons in my script that call window.open('myUploadScript.php?arguments=test...',''). I'm passing querystring
I have php script that creates a temporary watermark image for users that are
I have a PHP script that runs as a CGI program and the HTTP
I have a PHP script that initialises an image gallery. It loops through all
I have a PHP script that can encode a PNG image to a Base64
I have a PHP script that sends critical e-mails. I know how to check

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.