Tuesday, June 04, 2002 | |
I was considering a possible answer to Justin's problem with validating non-namespaced documents. It seemed like I could load an XmlReader with the document in question, then read the root <rss> element, check the version attribute, and at that point load the correct schema, create an XmlValidatingReader around the XmlReader, and go. No dice. It seems that you can't load a schema partway through the validation process, not that validation fails, but that invalid documents don't. The best workaround I could think of was to create 2 XmlReader objects, use the first one to peek at the version, then create an XmlValidatingReader around the 2nd. I'm sure this is lighter weight than creating an entire XmlDocument and then an XmlNodeReader around the document, but not as clean as I'd hoped could be the case.
7:02:36 PM permalink
|
Welcome Greg Reinacker to the weblog neighborhood! Greg is leaving Galileo June 14, and we'll all miss him. Greg was our resident COM and Windows security expert, among other things. Last I heard, he's still looking for his next gig, so if you're in the Denver area and need a Windows guru, look him up! 10:34:56 AM permalink
|