XML Resolver Funkiness
Posted: Thu Jan 28, 2010 7:55 pm
Normally I can do this sort of thing in C#, and I've tried a few variations, I've checked the MSDN documentation, etc... and my understanding is that XmlDocument, XmlReaderSettings, and XmlTextReader should all have a XmlResolver property.
I have tried to access this from each of the classes and I get an error: "Cannot find a definition for "xmlResolver" in "settings" whose type is "XmlReaderSettings"
When I copied the code, I of course got an error saying "Cannot find a definition for "ProhibitDtd" in "settings" whose type is "XmlReaderSettings". There is a member named "prohibitDtd" with a similar name.", but I get no such indicator for the XmlResolver
I have tried to access this from each of the classes and I get an error: "Cannot find a definition for "xmlResolver" in "settings" whose type is "XmlReaderSettings"
- Code: Select all
settings = XmlReaderSettings()
settings.xmlResolver = nil
settings.prohibitDtd = false
reader = XmlTextReader.create(FileStream(fileName),settings)
tmx = XmlDocument()
tmx.load(reader)
tus = tmx.selectNodes('//tu')
MessageBox.show(tus.count.toString,"count")
When I copied the code, I of course got an error saying "Cannot find a definition for "ProhibitDtd" in "settings" whose type is "XmlReaderSettings". There is a member named "prohibitDtd" with a similar name.", but I get no such indicator for the XmlResolver