Sign In/My Account | View Cart  
advertisement

Article:
 An XML Fragment Reader
Subject: Misleading Premise
Date: 2003-07-17 18:29:24
From: Alex Milowski

This article states "While many potential uses of XML result in fragments of XML text, not complete documents, XML parsers require complete documents to do their jobs properly." From an XML perspective, this is a complete document. Besides, the concept of "complete" is very abiguous. Does that mean sufficient to parse, validate, application valid, well-formed, or what?


In addition, java.io.SequenceInputStream does most of this already. I don't see how this is really that significant.


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Misleading Premise
    2003-07-17 20:33:16 William Brogden

    It is true that SequenceInputStream comes close. However if you use it, your SAX error reporting is by line number within the entire sequence - which I found pretty hard to interpret. By keeping track of line numbers within the separate chunks of text, it is easier to find the source of a parse error.

    • Misleading Premise
      2003-07-17 22:05:15 Alex Milowski

      That's a good point.


      My main point was that it isn't that XML is broken in some way as it can't deal with "incomplete documents". You've just found a convenient way to parse (and maybe validate) a group of individual streams of XML content within one parsing context without too much overhead.


Sponsored By: