Re: XML Comment Screwed - Possibly a bug in VB??
- From: "Siv" <g@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 15 Jun 2008 14:00:59 +0100
Göran
Thanks for the clarification, as I said to Stephany I am not experienced in XML and certainly don't feel like I need to know it inside out to make comments in my code. It does help to know why you get this type of error.
I have been programming in VB since Version 1.0 and prior to that have used the likes of DBA, Clipper, C and so on. My first computer was a Sinclair ZX81 followed by a Spectrum, then a QL, then an Atari 520ST and eventually a PC where my coding started to get a bit more serious. I also worked on Unisys B Series kit that had a Unix like OS and that treated me to some interesting error codes similar to the one you mentioned when I was doing some early forays into Pascal on that box. So I have seen around for a while.
Siv
"Göran Andersson" <guffa@xxxxxxxxx> wrote in message news:OPQi1LuzIHA.3968@xxxxxxxxxxxxxxxxxxxxxxx
Siv wrote:Hi,
Ok "Warning" I must be more precise. However, I think when I am entering a comment in my code and it "warns" me that "whitespace is not allowed at this location .." when in fact it should say "Ampersand not allowed in VB comment" it's more like a bug in VB as it is not telling me the true reason for the error.
Actually, the compiler is telling you the exact reason for the error. What you probably wish for is a message that tells you what it really is that you are trying to do and how to do it, but that is impossible as the compiler can not guess what is on your mind.
An ampersand is certainly allowed in an XML comment, but it has a special meaning. It's used to specify characters otherwise impossible to enter into XML code, so it should be followed by an identifier and a semicolon, like & or <.
When you put an ampersand in the XML comment, the compiler expects it to be followed by an identifier, by instead you put a space character after it. In light of that, I hope that you see that the compiler message is perfectly logical.
:)
If you think that todays error messages are not informative enough, you weren't around when they looked like this:
ERROR 47 IN LINE 460
;)
Your response assumes I understand XML which I never use,
Obviously you do. ;)
and have never really understood why everyone raves about it?
It's main advantage is actually that everyone raves about it. :) It's a widely spread format that is easy to read, both manually and programattically. There is nothing magical about it, it's just simple and structured, which is exactly what we need for a lot of the data exchange nowadays.
For example, I can just point someone to an url where the can get an XML file, perhaps accompanied by a short description if there is something in it that is unexpected or unusal, and the person can easily look at the file and determine how to write a program to read it. I don't have to send along a 42 page documentation of the file format, including what byte order and encoding to use, a description of the file structure, and how every single piece of information is arranged.
It just seems a bit insecure as a method of holding or transmitting data as it's just plain text that can be intercepted and read as such.
If you want security, you should encrypt the data anyway. Protection by obstruction just offers a false sense of security, not much more.
I get the interactivity between systems as a common data language, but you can achieve the same thing with a flat file??
Yes, of course you can, but XML offers a standardised and structured way of doing that. Of course, it's a very bloated format, so there are still some things that you want to use binary files for. For example, it would not make sense to have a file with 10 million lines like this:
<pixel x="42" y="18" red="242" green="72" blue="0"/>
:)
--
Göran Andersson
_____
http://www.guffa.com
.
- References:
- XML Comment Screwed - Possibly a bug in VB??
- From: Siv
- Re: XML Comment Screwed - Possibly a bug in VB??
- From: Stephany Young
- Re: XML Comment Screwed - Possibly a bug in VB??
- From: Siv
- Re: XML Comment Screwed - Possibly a bug in VB??
- From: Göran Andersson
- XML Comment Screwed - Possibly a bug in VB??
- Prev by Date: Re: Form field place holders in strings?
- Next by Date: Re: Form field place holders in strings?
- Previous by thread: Re: XML Comment Screwed - Possibly a bug in VB??
- Next by thread: Re: XML Comment Screwed - Possibly a bug in VB??
- Index(es):
Relevant Pages
|