> Seems to me it's kind of a waste of time for an app writer to count on > help from the DOM here, simply because there are going to be lots of > times when you don't have a DTD or schema or whatever. Thus, you're > going to have to write the code to nuke the superfluous whitespace > anyhow, so why not just curse a little bit and then do it?
I find it easier in some cases to get a DTD, easier in others to use it programattically. Even if there's no DTD for what I'm doing, I can always supply one to the parser get whitespace handling, namespace handling, default attributes, and validation all rolled into one. Alternatively, I could write all that code. But somehow a simple XML document (yes, I'm using schema, you got me) works better than lots of Java code. When the code is very generic, that's where I have to reimplement portions of the parser (no DTD=no validation). Sigh. > One of the nice things about doing database rather than document > processing is that you don't have to deal with whitespace. Sigh. -T. Actually databases tend to produce superflous spaces when using CHAR fields rather than VARCHAR :-) Lot's of trim calls there as well. arkin