This is a suttle point... I was parsing an 8 meg XML file with validation turned off, I could parse the file but could not read anything from it. I turned validation on (it takes way longer to parse) but now I can pull data from it. I assume this is because all those extra white space child nodes are not being created?
Thanks, Rob -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 13, 2002 10:00 AM To: [EMAIL PROTECTED] Subject: RE: Question on Feature: http://apache.org/xml/features/dom/include-ignorable-whitespace The parser doesn't know which ones are relevant, and which ones are not, unless you tell it. One of the ways is to define a DTD, and give "keys" element-only content. Then turn off the include-ignorable-whitespace feature. Cheers, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 [EMAIL PROTECTED] "Rob Outar" <[EMAIL PROTECTED] To: <[EMAIL PROTECTED]> o.org> cc: Subject: RE: Question on Feature: 12/13/2002 07:19 http://apache.org/xml/features/dom/include-ignorable-whitespace AM Please respond to xerces-j-user Is there any way to get rid of those irrelevant children? Thanks, Rob -----Original Message----- From: Swanson, Brion [mailto:[EMAIL PROTECTED] Sent: Thursday, December 12, 2002 6:08 PM To: '[EMAIL PROTECTED]' Subject: RE: Question on Feature: http://apache.org/xml/features/dom/include-ignorable-whitespace Hi Rob, Aside from the wonderful discussion of what is ignorable whitespace and what is not that Sandy and Joe have provided, your five children are thus: <keys> <!-- child #1: newline / whitespace --> <!-- child #2: --> <key name="foo">Blah</key> <!-- child #3: newline / whitespace --> <!-- child #4: --> <key -------/> <!-- child #5: newline --> </keys> I think is the answer to an implied question: Where are the other three children? (Parser says 5, I see 2...) Brion -----Original Message----- From: Rob Outar [mailto:[EMAIL PROTECTED] Sent: Thursday, December 12, 2002 4:54 PM To: [EMAIL PROTECTED] Subject: Question on Feature: http://apache.org/xml/features/dom/include-ignorable-whitespace The feature states the following: The only way that the parser can determine if text is ignorable is by reading the associated grammar and having a content model for the document. When ignorable white space text nodes are included in the DOM tree, they will be flagged as ignorable. The ignorable flag can be queried by calling the TextImpl#isIgnorableWhitespace():boolean method. This feature is relevant only when the grammar is DTD. My question is what does the parser consider ingnorableWhitespace? My question is prompted by the following: Consider: <keys> <key name = "foo">Blah</key> <key -------/> <keys> The parser is telling me that keys has 5 children, it looks like to be that keys has 2 children. Let me know. Thanks, Rob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
