473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

parse error


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
Feb 3 '06 #1
6 1471
Can anyone give me help here?

<?xlm version="1.0" ?>
^^

Soren
Feb 3 '06 #2
* 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.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Feb 4 '06 #3
Bjoern Hoehrmann wrote:
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.
Feb 4 '06 #4
Soren Kuula wrote:
Can anyone give me help here?


<?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
Feb 4 '06 #5
Bjoern Hoehrmann wrote:
* 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.


Bjoern,

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

Jim
Feb 4 '06 #6
Jim Anderson wrote:
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.
Feb 4 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steven | last post by:
I got a "Parse error: parse error in ..." in this line: if(empty($_POST){ ..... But if I fist assign $ssn=$_POST; and then if(empty($ssn){ ... it is working. Any advice? Thanks in advance.
1
by: H.L Bai | last post by:
hi, everybody i meet a parse error when i used the xml4c. any proposal is helpful. The error is following .../XMLRegionHandler.h:59 parse error before '*' .../XMLRegionHandler.h:60 parse...
2
by: Vittal | last post by:
Hello All, I am trying to compile my application on Red Hat Linux 8 against gcc 3.2.2. Very first file in application is failing to compile. I tried compiling my application on Linux 7.2...
21
by: BWIGLEY | last post by:
Basically I've just started making a game. So far it makes an array 25 by 20 and tries to make five rooms within it. In scr_make_room() there's parse errors: 20 C:\c\Rooms\Untitled1.c parse error...
6
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar...
5
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called...
1
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming. FYI Although I have called this...
1
by: Phaelle | last post by:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' What does that error mean? I can´t find the mistake!! In another script, I have got another kind of mistake : parse...
2
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
5
by: goldtech | last post by:
SAX XML Parse Python error message Hi, My first attempt at SAX, but have an error message I need help with. I cite the error message, code, and xml below. Be grateful if anyone can tell me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.