how to debug XML?

Discussion in 'XML' started by lkrubner@geocities.com, Oct 31, 2005.

  1. Guest

    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, 2005
    #1
    1. Advertising

  2. 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?
    --
    ..
     
    Arturius mac Aidan, Oct 31, 2005
    #2
    1. Advertising

  3. Peter Flynn Guest

    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/
     
    Peter Flynn, Oct 31, 2005
    #3
  4. 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.
     
    Malcolm Dew-Jones, Nov 2, 2005
    #4
  5. Guest

    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, 2005
    #5
  6. Peter Flynn Guest

    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/
     
    Peter Flynn, Nov 6, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RonL
    Replies:
    0
    Views:
    745
  2. ringos75
    Replies:
    0
    Views:
    964
    ringos75
    Apr 14, 2005
  3. Mike C. Fletcher
    Replies:
    3
    Views:
    987
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 12, 2003
  4. André
    Replies:
    3
    Views:
    1,595
  5. Erik Wasser
    Replies:
    5
    Views:
    463
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page