B
Bob Mixon [SPS MVP]
All,
There are so many newsgroups these days, I am not sure if this is the correct
one I should be posting to; if not, I apoligize!
I have the following xml file, this was generated by the .NET disco.exe utility.
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx?wsdl"
docRef="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/"
/>
<soap address="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx"
xmlns:q1="http://tempuri.org/" binding="q1:AdGroupsListSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/"
/>
</discovery>
I am having a difficult time setting up the NamespaceManager and making the
SelectSingleNode call correctly to return the <contractRef> element. Can
someone please provide me with an example? Here is what I have so far:
XmlNamespaceManager nm = new XmlNamespaceManager( doc.NameTable );
nm.AddNamespace( "xsd", "http://www.w3.org/2001/XMLSchema" );
nm.AddNamespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance" );
XmlElement discoveryElem = doc.DocumentElement;
XmlNode node = discoveryElem.SelectSingleNode( "//contractRef", nm );
The node variable always returns null.
Thank you in advance for all of the help!
----------------------------------------------------------
Bob Mixon
Managing Director
ShareSquared, Inc. - Your Knowledge Management Experts!
http://www.ShareSquared.com
Microsoft SharePoint Portal Server MVP
(Blog) http://bobmixon.xwiki.com
----------------------------------------------------------
There are so many newsgroups these days, I am not sure if this is the correct
one I should be posting to; if not, I apoligize!
I have the following xml file, this was generated by the .NET disco.exe utility.
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx?wsdl"
docRef="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/"
/>
<soap address="http://sps2003:81/Services/AdGroupsList/AdGroupsList.asmx"
xmlns:q1="http://tempuri.org/" binding="q1:AdGroupsListSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/"
/>
</discovery>
I am having a difficult time setting up the NamespaceManager and making the
SelectSingleNode call correctly to return the <contractRef> element. Can
someone please provide me with an example? Here is what I have so far:
XmlNamespaceManager nm = new XmlNamespaceManager( doc.NameTable );
nm.AddNamespace( "xsd", "http://www.w3.org/2001/XMLSchema" );
nm.AddNamespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance" );
XmlElement discoveryElem = doc.DocumentElement;
XmlNode node = discoveryElem.SelectSingleNode( "//contractRef", nm );
The node variable always returns null.
Thank you in advance for all of the help!
----------------------------------------------------------
Bob Mixon
Managing Director
ShareSquared, Inc. - Your Knowledge Management Experts!
http://www.ShareSquared.com
Microsoft SharePoint Portal Server MVP
(Blog) http://bobmixon.xwiki.com
----------------------------------------------------------