Author Topic: Removing XML prolog statement  (Read 4066 times)


  • Jr. Member
  • **
  • Posts: 75
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Removing XML prolog statement
« on: June 12, 2002, 08:02:15 PM »
I recently ran into a problem with the following web page:
where I got an error saying "The XML page cannot be displayed"
and "Cannot have a DOCTYPE declaration outside of a prolog".
The problem appears to be that the page starts with an XML prolog statement
that looks like:
<?xml version="1.0" encoding="iso-8859-1"?>
and Proxomitron filters that had matched on <start> had placed stuff before
this line. Apparently MSIE doesn't like it if the XML prolog statement
isn't at the beginning of the page. Since the XML prolog statement is
an optional thing, I ended up removing it from the page in order to
get around the problem:

Name = "Remove XML prolog"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "$NEST(<?xml, ?>)"
Limit = 256
Match = "*"

Opera doesn't seem to have this problem.