473,657 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1483
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****@h oehrmann.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
4101
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
2497
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 error before '*'
2
4969
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 against gcc 3.1 and it got build without any problems. However on against gcc 3.2.2 I hitting this error:
21
2912
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 before "top_x" 28 C:\c\Rooms\Untitled1.c parse error before "first_square_x" 35 C:\c\Rooms\Untitled1.c parse error before '}' token Why are these happening? int room_square, selected = 1, squares = 1, first_square_x
6
8559
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 circumstances(XML file source) and with exactly the same value it gets it perfectly correct all the time. These are the results I got, XML is always correct, CSV are only incorrect for some of the values (above about 0.01) but always gives the...
5
64620
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 article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
1
64094
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 article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
1
3739
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 error: parse error at .. line (and it is always on the last line!) Thanks for your help Raphaelle
2
3216
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", $formName); // 06-22-07 - the next commands try to import all the functions that the
5
2701
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 what the fix is. Thanks.
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.