阅读背景:

使用XmlDocument从带或不带命名空间的xml文件中读取

来源:互联网 

I have some code that reads from xml files with a namespace using XmlDocument.My challenge is that i have the namespace of the file i'm reading hard coded for now and i pass that to the XmlNamespaceManager.I would like for my approach to be a little more flexible.To read from any kind of xml file.If it has a namespace,then use the namespace manager to read the elements without hard coding the namespace.If the file doesn't have a namespace,then go ahead and just parse it.Below is what I've done.I have some code that reads from xml files with




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: