parse error

J

Jim Anderson

I'm just starting to use XML and I'm thinking of using
DocBook for some documentation. I tried my first simple
example from the book and I'm getting a parse error.

I iniitally typed in the offending code, but when it
did not parse, I figured I must be doing something
wrong I decided to take the code directly from a CDROM
that came with the book I'm using to learn from. Still,
I get the same parse error.

I tried reading this in with two browsers: netscape 7.2
and Konqueror 3.3.0-8.

I'm attaching the text file which I tried to read into
the browsers.

The Error message:

fatal parsing error: unexpected character in line 3, column 55
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
^

Can anyone give me help here?

Thanks in advance.

Jim Anderson
 
B

Bjoern Hoehrmann

* Jim Anderson wrote in comp.text.xml:
fatal parsing error: unexpected character in line 3, column 55
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
^

Omitting the system identifier is not allowed in XML, you are either
trying to parse an SGML document or you have to fix it before you can
parse it e.g. by adding a system identifier.
 
J

Joe Kesselman

Bjoern said:
trying to parse an SGML document

Not unlikely. Docbook exists in both SGML and XML dialects. Make sure
the example you're using is written in the XML version.
 
J

Jim Anderson

Soren said:
<?xlm version="1.0" ?>
^^

Soren


Soren,

Thank you. I found that not only did I have the 'lm' tranposed,
but the xml line had to be the first line, not the 2nd line.

Jim
 
J

Jim Anderson

Bjoern said:
* Jim Anderson wrote in comp.text.xml:



Omitting the system identifier is not allowed in XML, you are either
trying to parse an SGML document or you have to fix it before you can
parse it e.g. by adding a system identifier.

Bjoern,

Thank you. After fixing the xlm --> xml problem, then I changed
PUBLIC to SYSTEM and my file parsed.

Jim
 
J

Joe Kesselman

Jim said:
Thank you. I found that not only did I have the 'lm' tranposed,
but the xml line had to be the first line, not the 2nd line.

Yes. Per the XML spec, the *only* thing that can preceed the XML
Declaration is the (optional, in most encodings) Byte Order Mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top