display xml code in browser??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
waskelton4
Forum Contributor
Posts: 132
Joined: Mon Sep 09, 2002 6:42 pm

display xml code in browser??

Post by waskelton4 »

I'm working on building an xml file programatically with php and I'd like to view it in a browser window while testing.

When I use the default php content header.. I don't see anything. (have to view code)
When i use:

Code: Select all

<?php header(&quote;Content-type: text/xml&quote;); ?>
I get an error parsing the xml. But the code that is being parsed is correct for my application.

Anyone know of a quick and easy way to display all of this xml?

Thanks

Will
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

If your XML is not properly formatted. You will get an xml parse error. view the source of the file and you should see your xml.
waskelton4
Forum Contributor
Posts: 132
Joined: Mon Sep 09, 2002 6:42 pm

Post by waskelton4 »

hawleyjr wrote:If your XML is not properly formatted. You will get an xml parse error. view the source of the file and you should see your xml.
Thanks for the reply.. about 2.5 seconds before the notify email came to me about your reply.. I figured out my issue.. (at least this issue)

thanks!

ws
Post Reply