Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   What to code in php to solve this error (https://www.warriorforum.com/programming/429185-what-code-php-solve-error.html)

leppozdrav 8th August 2011 10:57 AM

What to code in php to solve this error
 
This XML file does not appear to have any style information associated with it. The document tree is shown below." why this error in Google chrome when i run my php project. What to code in php to solve this error?

Workman 9th August 2011 10:13 AM

Re: What to code in php to solve this error
 
That's not really an error... It sounds like it's simply displaying an XML document.

It would help if you shared the url you're working on or at least some additional details about your site.

ereadergold 9th August 2011 10:40 AM

Re: What to code in php to solve this error
 
Yes, a URL and some information about your project and what it is you are trying to accomplish would be helpful! The error message itself is pretty self-explanatory.

Bill

productsmith 11th August 2011 10:52 PM

Re: What to code in php to solve this error
 
Thats just a warning

ussher 15th August 2011 10:04 PM

Re: What to code in php to solve this error
 
What everone is saying is probably right. If its an XML document then its probably not ment to be viewed, XML is for sending data in a structured manner.

But incase you DID want the data to be viewed, attach a stylesheet:
Associating Style Sheets with XML documents 1.0 (Second Edition)

Normally you would pickup the XML data and put it where it needed to go, say into a database or process it so that you had control over what data you actually want to show before spitting it back out to the end user.

munirz 16th August 2011 03:36 AM

Re: What to code in php to solve this error
 
ohh really..now i know thanx

GetFeeDomainName 16th August 2011 12:30 PM

Re: What to code in php to solve this error
 
if that's a page that should render as webpage, then you are likely sending 'text/xml' or 'application/x-html+xml' Content-Type header.
in that case, try to add
PHP Code:

header('Content-Type: text/html'); 

just before the output.
(if it works afterwards, change your default httpd settings.)

if you are serving a plain XML, then the document string as shown is what you should expect.


All times are GMT -6. The time now is 04:53 AM.