GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing xmlvalid.com — Unexpected XML declaration (.NET): how to fix | xmlvalid Unexpected XML declarationAn XML declaration (<?xml …?>) appears somewhere other than the very start The message, as .NET reports it
Unexpected XML declaration. The XML declaration must be the first node in the document, and no whitespace characters are allowed to appear before it. Line 2, position 3.
Why it happens
How to fix itTrim the input before parsing ( .NET throws an The same problem in xmlvalidxmlvalid validates with libxml2, which reports it as XML declaration allowed only at the start of the document. It checks the whole document in your browser and lists every schema error with its line and column, not only the first XML declaration allowed only at the start of the document
ExampleReports the error
Fixed
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |