473,805 Members | 1,981 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invalid token error

I have an xml document, created using xmlTextWriter,
at(http://www.supremecourtofohio.gov/rs.../2006-1942.xml) that
won't validate. It fails with "invalid token, document not well formed". Then
if I open the same file in notepad, save it without changing anything, and
try again, it validates (I'm using http://www.rssvalidator.org). So I'm
thinking there are invalid characters that notepad is removing ?? But what
are they and why? Can someone help me?

Thanks
Oct 31 '06 #1
3 4230
John Hopper wrote:
I have an xml document, created using xmlTextWriter,
at(http://www.supremecourtofohio.gov/rs.../2006-1942.xml) that
won't validate.
Hardly surprising, seeing as it doesn't specify a Schema or DTD
explicitly. It's almost well-formed, but it has a NUL as the last
byte, and it uses a non-standard way of declaring the encoding.

If you have software that makes the implicit assumption and uses
the RSS 2.0 spec, perhaps it might validate.
It fails with "invalid token, document not well formed".
That may refer to the ASCII NUL which comes immediately after the
</rssend-tag. This looks like an artifact of the author using
some non-XML software on it (or to generate or serve it).
Then if I open the same file in notepad,
Please don't use non-XML software for handling XML documents.
There are plenty of perfectly good free XML editors for this
kind of work.
save it without changing anything,
How do you know it wasn't Notepad which removed the NUL character?
and try again, it validates (I'm using http://www.rssvalidator.org).
So I'm thinking there are invalid characters that notepad is removing
?? But what are they and why? Can someone help me?
My money is on that NUL.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Oct 31 '06 #2
Peter,

Thanks for your response. I am wondering what you are using to find the null
value at the end of the file. Such a tool would be very useful to me.

Thank you,

John Hopper

"Peter Flynn" wrote:
John Hopper wrote:
I have an xml document, created using xmlTextWriter,
at(http://www.supremecourtofohio.gov/rs.../2006-1942.xml) that
won't validate.

Hardly surprising, seeing as it doesn't specify a Schema or DTD
explicitly. It's almost well-formed, but it has a NUL as the last
byte, and it uses a non-standard way of declaring the encoding.

If you have software that makes the implicit assumption and uses
the RSS 2.0 spec, perhaps it might validate.
It fails with "invalid token, document not well formed".

That may refer to the ASCII NUL which comes immediately after the
</rssend-tag. This looks like an artifact of the author using
some non-XML software on it (or to generate or serve it).
Then if I open the same file in notepad,

Please don't use non-XML software for handling XML documents.
There are plenty of perfectly good free XML editors for this
kind of work.
save it without changing anything,

How do you know it wasn't Notepad which removed the NUL character?
and try again, it validates (I'm using http://www.rssvalidator.org).
So I'm thinking there are invalid characters that notepad is removing
?? But what are they and why? Can someone help me?

My money is on that NUL.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Nov 1 '06 #3
Peter,

It would also be helpful to know the "numeric entity value", ie the
character code value for ascii null so that I might remove it.

Thank you,

John Hopper

"Peter Flynn" wrote:
John Hopper wrote:
I have an xml document, created using xmlTextWriter,
at(http://www.supremecourtofohio.gov/rs.../2006-1942.xml) that
won't validate.

Hardly surprising, seeing as it doesn't specify a Schema or DTD
explicitly. It's almost well-formed, but it has a NUL as the last
byte, and it uses a non-standard way of declaring the encoding.

If you have software that makes the implicit assumption and uses
the RSS 2.0 spec, perhaps it might validate.
It fails with "invalid token, document not well formed".

That may refer to the ASCII NUL which comes immediately after the
</rssend-tag. This looks like an artifact of the author using
some non-XML software on it (or to generate or serve it).
Then if I open the same file in notepad,

Please don't use non-XML software for handling XML documents.
There are plenty of perfectly good free XML editors for this
kind of work.
save it without changing anything,

How do you know it wasn't Notepad which removed the NUL character?
and try again, it validates (I'm using http://www.rssvalidator.org).
So I'm thinking there are invalid characters that notepad is removing
?? But what are they and why? Can someone help me?

My money is on that NUL.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Nov 1 '06 #4

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

Similar topics

3
6844
by: tag | last post by:
Hi, I have a xml field: <Cell Col="2" Row="10">="Actual Asset mix "&text($C$46,"dd-mmm-yyyy")</Cell> ^ | this is column 56
4
6864
by: evan.cooch | last post by:
Greetings. Suppose I have some function called "CheckIt" - some function to validate form data before submitting it to e CGI script. Pretend the name of the form is "TheForm". If I use the following code, everything work perfctly: <Input type=button VALUE="Submit your form" onClick="javascript:return CheckIt(TheForm)">
4
4740
by: Erik H. | last post by:
I have an ASPX page in which I am trying to bind a datagrid to a dataset pulled from Microsoft Access DB using code inline method. For some reason, the compiler is having a problem with 'using'. Any help here would be much appreciated. Thanks! Getting the following error: CS1519: Invalid token 'using' in class, struct, or interface member declaration My Code:
0
1352
by: s.caron | last post by:
Hi, I'm trying to open an aspx page but I have this error Compiler Error Message: CS1519: Invalid token '=' in class, struct, or interface member declaration in the line : usuario.Credentials = System.Net.CredentialCache.DefaultCredentials; If I put this code in a method like Page_load
3
13741
by: Erik H. | last post by:
I have an ASPX page in which I am trying to bind a datagrid to a dataset pulled from Microsoft Access DB using code inline method. For some reason, the compiler is having a problem with 'using'. Any help here would be much appreciated. Thanks! Getting the following error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify...
3
2724
by: Twanger | last post by:
I'm getting a compiler error on my ASP.NET page and I can't see the cause. I have a simple C# class compiled into a DLL and placed in my bin directory which has a public property QuestionText. When I try and set the property the compiler throws up Compiler Error Message: CS1519: Invalid token '=' in class, struct, or interface member declaration If I don't try and set the property it prints out the default value of the property fine.
0
5702
by: Ben Holness | last post by:
Hi all, I have a system which allows users to enter a message on a (PHP) website. This message is then put into a (MySQL) Database. A perl script then picks up the message and creates an XML document. The webpages, database and XML are all UTF-8, however every now and then I get an error in the XML parser that tells me I have an invalid token. This occurs when the message contains particular characters, although I don't
3
16255
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very strange error. In your experience, where I should looking to find the real error? Surely the sintax of glut is correct... gcc.exe -c glut_bitmap.c -o glut_bitmap.o -I"C:/Dev-Cpp/include" -I"../../include" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG...
9
2167
by: Sebouh | last post by:
I'm very close of shooting myself in the head right now. Why in hell does free(xx) give me an error: *** glibc detected *** free(): invalid pointer: 0x08ce6158 *** // The function returns something like the argv parameter in main. char** parser (char* ch) { char** xx = NULL; char* temp; // contains the input which will be modified when using strtok int length = strlen (ch); // length of the string char* token;
3
4684
by: brad | last post by:
This works: This does not (one the end, 09 is used instead of 9) File "<stdin>", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an invalid token while 9 does not?
0
9716
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
10609
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10366
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
10105
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
9185
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...
1
7646
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5542
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...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.