Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing the <?xml version... ?> tag

Status
Not open for further replies.

estrellas

Programmer
Jul 16, 2004
48
0
0
US
hey guys -
i'm totally stumped with this problem.

i'm programming in dreamweaver (duh) and whenever i do a template update on my site there's this grotesque two lines that always appear even after i delete them in an editable region that make my php in the code not want to work.

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

how do you permanently remove this (other than deleting it - which gets annoying after a while since i have 25+ pages to go through and delete all of these tags)

thanks in advance guys - if you need to see more of the code .. i'll post more just lemme know.

cheers :)

-------
 
cool and thanks! that'd totally work too if i owned the original template (we're nesting templates up to 5 levels deep - i don't own/have privilidges to the first 2 levels)

is there any other 'shortcut' to delete the <?xml... ?> tag that you know of? if not that's totlly cool.

thanks again :)
cheers!

-------
 
sorry missed the PHP bit
there will be some way because obviously going to cause a parse error.
I don't use templates at all, so my workaround is to have the DTD in an include and echo the <?xml tag onto the page as a string variable so it is never parsed server-side.

maybe the PHP programmers know a workaround for templates forum434



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
try changing it to this

Code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top