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

  • Home
  • SEARCH
  • 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 7617345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:07:37+00:00 2026-05-31T03:07:37+00:00

I use this http://goo.gl/d3vLW code for my project, but it’s not working the way

  • 0

I use this http://goo.gl/d3vLW code for my project, but it’s not working the way how I want it.
Using Codeigniter I just modified the downloadUrl function phpsqlajax_genxml.php to controller/method

The problem: if I use header(“Content-type: text/xml”); in the method, I get the following error:

XML Parsing Error: junk after document element
Location: http://localhost/website/
Line Number 3, Column 1:<!DOCTYPE html>
^

Viewing the source code the generated xml is before my template php html tag…

If I comment out the header() , I get no markers on the map.

If I add the following line

request.overrideMimeType('text/xml');

in the javascript part of the code to the end of downloadURL function, markers are there, page is working successful, but why I have the xml again before the template php html tag?

As I guess, the php method should pass the generated xml to the javascript function, but not in “visible mode”, hmm?

So..

  1. why I get error using header() – as in the example – in my method?

  2. If I stuck with te second solution that works, how to pass xml without storing it before the template file html tag? It’s ugly and increase file size..

Thanks

  • 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-31T03:07:39+00:00Added an answer on May 31, 2026 at 3:07 am

    Could it be that you have output the XML in the controller method, and then load the view? I’m just guessing, you didn’t post the whole code?

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

Sidebar

Related Questions

I want to use this function: http://www.frankmacdonald.co.uk/php/post-to-wordpress-with-php.html Its used to post to Wordpress using
I'm trying to to use this class http://robbyonrails.com/articles/2005/05/11/parsing-a-rss-feed but am not sure where to
I try to get whois in python. I use this http://code.google.com/p/pywhois/ but it run
I use this code: http://blogswizards.com/plugin-development/sliding-boxes-and-captions-with-jquery On a simple gallery site I am building. Specifically
I want to use this pure HTML/CSS template for my ASP.NET website: http://sub3.tanguay.de I
I use v-usb library for my project. I wrote code and i want compile
Should this code not work? I actually have no idea how to use this
I want to use a color map from http://goo.gl/5P4CT for my matplotlib heat map.
i use this http://www.mudaimemo.com/p/quickedit/# and it work good the problem is i want use
Im trying to use this http://code.google.com/p/pywhois/ along with the socket.gethostbyaddr . import socket import

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.