I am selecting nodes using XPathDocument from XML containing namespaces.
Appropriate namespace has been added:
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nav.NameTable);
nsmgr.AddNamespace("nsABC", @"http://www.thesite.com/xsd/XYZ123.xsd");
Once selecting a node using Select("XPathExpression"):
- Will
xsdfile be download from the external server each time the Select method is executed? - Will
xsdfile be downloaded once and cached during app life-time, or in the system?
Providing wrong URI in nsmgr.AddNamespace, casues Select to NOT recognise nodes, so this is a proof that it has to be aware of xsd file, thus it had to be downloaded.
- What about running app for the first time on other PC without internet access, where there is no chance to have this
xsdcached anywhere. Where 'xsd' was is taken from? I have tested this option and code was executed properly.