Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Invalide character in database XML

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

PachNPRO InfinityMember since 2009
Hi everybody,

maybe you could give me some background information about the database xml of VDJ.
Why does VDJ accept characters that are illegal according to the XML specifications?

Currently I'm trying to write a little database tool.
Therefore I have to "import" the db into my program.
But sometimes I get an error saying that the db could not be load because of an illegal character in the db.
Mostly in the comment tag.

So, does anybody know how VDJ handles this problem?
 

geposted Thu 03 Mar 11 @ 3:46 am
Try to catch the error to see what's the character that causes the parser to halt.
However since I'm writing a db tool myself in VB.NET I can tell you that the only "special" character you should treat on your code is CRLF (Carriage Return / Line Feed) since COMMENTS can have these characters...

Finally keep in mind that the V6 XML Database is UTF-8, not ANSI. You should keep that in mind too if someone of the users of your up uses a language with "special" characters (like Greek). They are legal characters for UTF-8, but "illegal" for ANSI...
 

geposted Thu 03 Mar 11 @ 3:58 am
PachNPRO InfinityMember since 2009
Hi, thanks for your response.

Yes I know that it is utf-8. All illegal characters are:

0×00
0×01
0×02
0×03
0×04
0×05
0×06
0×07
0×08 0x0B
0x0C
0x0E
0x0F 0×10
0×11
0×12
0×13
0×14
0×15 0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0×16
0×17
0×18
0×19 0x7F


If you don't have a solution for your VB Problem check this out.
I'm trying it with C#.NET but still implementing it so I dont know if it really works.
But seems so:

http://seattlesoftware.wordpress.com/2008/09/11/hexadecimal-value-0-is-an-invalid-character/
 

geposted Thu 03 Mar 11 @ 5:21 am
Actually I don't have any issues reading the XML database with VB.NET because I don't use an XML parser but I parse the file myself with my own routines!!!
 

geposted Thu 03 Mar 11 @ 12:26 pm
PachNPRO InfinityMember since 2009
How do you handle illegal charactes in your parser?

My problem is the <comment> tag in the xml.
If here is a < character or a > i get an exception while loading.
 

geposted Fri 04 Mar 11 @ 4:29 am
I parse the XML file as PLAIN text and I have implemented my own "XML node" handling. This way I always "clean" the input for ANY kind of strange characters/symbols e.t.c.
 

geposted Fri 04 Mar 11 @ 8:04 am


(Alte Themen und Foren werden automatisch geschlossen)