473,322 Members | 1,526 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,322 software developers and data experts.

how to debug XML?

When I go to groups.google.com and run a search against the
comp.text.xml newsgroup, using the words "debug XML" as my search term,
the results that come up are either irrelevant are surprising old. Of
the top results that are relevant, one is from 1999 and the other is
from 2001. So let me ask the question again, what are people doing to
debug their XML? There are some validators online, is that what
everyone uses? Or do some IDE's have built-in abilities to test and
debug XML and DTDs?

Oct 31 '05 #1
5 6702
lk******@geocities.com wrote:
When I go to groups.google.com and run a search against the
comp.text.xml newsgroup, using the words "debug XML" as my search term,
the results that come up are either irrelevant are surprising old. Of
the top results that are relevant, one is from 1999 and the other is
from 2001. So let me ask the question again, what are people doing to
debug their XML? There are some validators online, is that what
everyone uses? Or do some IDE's have built-in abilities to test and
debug XML and DTDs?


There are dozens, if not hundreds of ways to answer this question. I have
traditionally used XEmacs with PSGML mode. That seems to be falling behind
the times. I hear nxml-mode works well, but I have not been able to make
much use of it yet. But (X)Emacs isn't really an editor, it's a form of
insanity. IOW, the learning curve is very steep, and it requires a whole
different way of thinking than the Mac/MS UI paradigm.

It sounds like you are very new to XML. Can you describe your platform,
your current tools, your immediate objectives, etc., so that others can
provide more specific and helpful answers?
--
..
Oct 31 '05 #2
lk******@geocities.com wrote:
When I go to groups.google.com and run a search against the
comp.text.xml newsgroup, using the words "debug XML" as my search
term, the results that come up are either irrelevant are surprising
old. Of the top results that are relevant, one is from 1999 and the
other is from 2001. So let me ask the question again, what are people
doing to debug their XML? There are some validators online, is that
what everyone uses? Or do some IDE's have built-in abilities to test
and debug XML and DTDs?


"Debug" is an unusual word to use in connexion with XML, which is why
you find some rather strange links. XML is not a programming language,
so it doesn't have "bugs" in the sense that a program might. There are
two related types of error that do occur in XML, however:

a) conceptual errors in the construction of DTDs or Schemas
b) well-formedness or validity errors in the document

Type (a) is usually down to a misunderstanding of the nature of markup.
Some people want to model data in unusual, perverse, or vexatious ways
(even CS people who ought to know better :-) but mostly there are good
tools for creating Schemas and DTDs built into IDEs and editors which
allow you to test their syntactic validity even if they allow semantic
nonsense.

Type (b) is tested with standard parsing and validation tools, either
standalone (from the console command line) or built into the interface
of whatever editor or other IDE you are using.

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Oct 31 '05 #3

Peter Flynn wrote:
There are
two related types of error that do occur in XML, however:

a) conceptual errors in the construction of DTDs or Schemas
b) well-formedness or validity errors in the document

Type (a) is usually down to a misunderstanding of the nature of markup.
Some people want to model data in unusual, perverse, or vexatious ways
(even CS people who ought to know better :-) but mostly there are good
tools for creating Schemas and DTDs built into IDEs and editors which
allow you to test their syntactic validity even if they allow semantic
nonsense.

Type (b) is tested with standard parsing and validation tools, either
standalone (from the console command line) or built into the interface
of whatever editor or other IDE you are using.


I guess I meant, party, option B, and then I guess I also meant the PHP
code that might generate some XML. But I suppose that is a PHP
question. I was thinking about well-formedness, for sure, but also
enforcement of a scheme. Like, if a DTD says only one thing is allowed
in a field, and something else gets in there. I suppose that is
well-formedness too?

Nov 2 '05 #4
lk******@geocities.com wrote:

: Peter Flynn wrote:
: > There are
: > two related types of error that do occur in XML, however:
: >
: > a) conceptual errors in the construction of DTDs or Schemas
: > b) well-formedness or validity errors in the document
: >
: > Type (a) is usually down to a misunderstanding of the nature of markup.
: > Some people want to model data in unusual, perverse, or vexatious ways
: > (even CS people who ought to know better :-) but mostly there are good
: > tools for creating Schemas and DTDs built into IDEs and editors which
: > allow you to test their syntactic validity even if they allow semantic
: > nonsense.
: >
: > Type (b) is tested with standard parsing and validation tools, either
: > standalone (from the console command line) or built into the interface
: > of whatever editor or other IDE you are using.

: I guess I meant, party, option B, and then I guess I also meant the PHP
: code that might generate some XML. But I suppose that is a PHP
: question. I was thinking about well-formedness, for sure, but also
: enforcement of a scheme. Like, if a DTD says only one thing is allowed
: in a field, and something else gets in there. I suppose that is
: well-formedness too?

enforcement of a scheme = validation

You want a "validating parser".

Xerces is one such parser. Not sure about php specific tools.
--

This programmer available for rent.
Nov 2 '05 #5
lk******@geocities.com wrote:
Peter Flynn wrote:

[...]
Type (b) is tested with standard parsing and validation tools, either
standalone (from the console command line) or built into the
interface of whatever editor or other IDE you are using.


I guess I meant, party, option B, and then I guess I also meant the
PHP code that might generate some XML. But I suppose that is a PHP
question. I was thinking about well-formedness, for sure, but also
enforcement of a scheme. Like, if a DTD says only one thing is allowed
in a field, and something else gets in there. I suppose that is
well-formedness too?


No, that's a validity error unless the something-else is malformed.

For example, if the DTD says element type A can only contain an
instance of element type B, and your file has

<A><B>text</B><C>text</C></A>

then that is a validity error. It's well-formed, but it conflicts
with the DTD.

If, on the other hand, it said <A><B>text</B><C>text<C></A> then
that is not well-formed, and it's an error regardless of whether
you use a DTD or not.

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Nov 6 '05 #6

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

Similar topics

8
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
7
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
9
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
6
by: swartzbill2000 | last post by:
Hello, I have a VB 2005 Express project with a TraceListener-derived class to route Debug.Print output to a log file. It works fine for Debug builds. What is the correct combination of changes to...
6
by: pauldepstein | last post by:
To help me debug, I am writing a lot of information into a stream which I call debug. However, because of the large amount of time taken to print this information, I only want this printed while...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
0
by: BA | last post by:
I posted on this once before and could not get a solution, I am hoping someone can help. I have a very strange code debug behavior that I cannot make heads or tails of: I have c# code being...
3
by: rorni | last post by:
Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of...
0
GaryTexmo
by: GaryTexmo | last post by:
Nothing amazing here, this is just a base groundwork for a debug window that someone could use to output debug text in a windows application. It provides fairly basic functionality so feel free to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.