本文介绍了如何使用selectnodes方法获取下面的Xml文件中的节点KeyOwner?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 如何使用selectnodes方法在下面的Xml文件中获取节点KeyOwner? 我想使用selectnodes方法在下面的Xml文件中获取节点keyOwner。 < soapenv:Envelope xmlns:soapenv = http://schemas.xmlsoap.org/soap/envelope/ xmlns:cus = http://wps.fgb.com/ CustomerOnboard / xmlns:cus1 = http://util.fgb.com/CustomerOnboardDetails xmlns:cry = http://util.fgb.com/Crypt > < soapenv:标题/ > < soapenv:正文 > < cus:getOnboardingDetails > < > < id > 400004 < / id > < customer > < ; cus1:onBoardDetails > < cus1:cryptParameter > < cry:cryptMode > PGP < / cry:cryptMode > < cry:cryptAlgorithm > AES < / cry:cryptAlgorithm > < cry:hashingAlgorithm > SHA < / cry:hashingAlgorithm > < cry:key > < cry:keyType > RSA < / cry:keyType > < cry:keyOwner > fgb < / cry: keyOwner > < cry:keyPath > KEYPATH < / cry:keyPath > < cry:KeySize > 2048 < / cry:KeySize > < cry:secret > ?< / cry:secret > < cry:keyIndi​​cator > KEYINDCTR < / cry:keyIndi​​cator > < cry:keyExpiry > 12/10/20145 < / cry:keyExpiry > < / cry:key > < cry:key > < cry:keyType > RSA < / cry:keyType > < cry:keyOwner > fgb < / cry:keyOwner > < cry:keyPath > KEYPATH < / cry: keyPath > < cry:KeySize > 2048 < / cry:KeySize > < cry:secret > ?< / cry:secret > < cry:keyIndi​​cator > KEYINDCTR < / cry:keyIndi​​cator > < cry:keyExpiry > 12/10/20145 < / cry:keyExpiry > < / cry:key > < / cus1:cryptParameter > < / cus1:onBoardDetails > < cus1:customerNo > 600061 < / cus1:customerNo > < / customer > < / in > < / CUS :getOnboardingDetails > < / soapenv:正文 > < / soapenv:Envelope > 解决方案 从这里开始: XmlNode.SelectNodes方法(字符串,XmlNamespaceManager) [ ^ ] How to fetch the node KeyOwner in the below Xml File using selectnodes method?I want to fetch the node keyOwner in the below Xml file using selectnodes Method. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://wps.fgb.com/CustomerOnboard/" xmlns:cus1="http://util.fgb.com/CustomerOnboardDetails" xmlns:cry="http://util.fgb.com/Crypt"> <soapenv:Header/> <soapenv:Body> <cus:getOnboardingDetails> <in> <id>400004</id> <customer> <cus1:onBoardDetails> <cus1:cryptParameter> <cry:cryptMode>PGP</cry:cryptMode> <cry:cryptAlgorithm>AES</cry:cryptAlgorithm> <cry:hashingAlgorithm>SHA</cry:hashingAlgorithm> <cry:key> <cry:keyType>RSA</cry:keyType> <cry:keyOwner>fgb</cry:keyOwner> <cry:keyPath>KEYPATH</cry:keyPath> <cry:KeySize>2048</cry:KeySize> <cry:secret>?</cry:secret> <cry:keyIndicator>KEYINDCTR</cry:keyIndicator> <cry:keyExpiry>12/10/20145</cry:keyExpiry> </cry:key> <cry:key> <cry:keyType>RSA</cry:keyType> <cry:keyOwner>fgb</cry:keyOwner> <cry:keyPath>KEYPATH</cry:keyPath> <cry:KeySize>2048</cry:KeySize> <cry:secret>?</cry:secret> <cry:keyIndicator>KEYINDCTR</cry:keyIndicator> <cry:keyExpiry>12/10/20145</cry:keyExpiry> </cry:key> </cus1:cryptParameter> </cus1:onBoardDetails> <cus1:customerNo>600061</cus1:customerNo> </customer> </in> </cus:getOnboardingDetails> </soapenv:Body></soapenv:Envelope> 解决方案 Start here: XmlNode.SelectNodes Method (String, XmlNamespaceManager)[^] 这篇关于如何使用selectnodes方法获取下面的Xml文件中的节点KeyOwner?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 10:28