SelectSingleNode, LINQ Equivalent?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I am having trouble trying to get values of AutoConnectOnInternet and AccessString using LINQ to XML.
Is there a LINQ VB equivivalent of SelectSingleNode?
<pre class="prettyprint lang-vb _AutoConnectOnInternet = xmlDoc.SelectSingleNode("/n:MBNProfile/n:AutoConnectOnInternet", manager).InnerText
_AccessString = xmlDoc.SelectSingleNode("/n:MBNProfile/n:Context/n:AccessString", manager).InnerText[/code]
<pre class="prettyprint <br/><?xml version="1.0"?>
<MBNProfile xmlns="http://www.microsoft.com/networking/WWAN/profile/v1
<Name>vodafone UK</Name>
<IsDefault>true</IsDefault>
<ProfileCreationType>DeviceProvisioned</ProfileCreationType>
<SubscriberID>894410000012345678999999</SubscriberID>
<SimIccID>8944100000123456789</SimIccID>
<HomeProviderName>vodafone UK</HomeProviderName>
<AutoConnectOnInternet>true</AutoConnectOnInternet>
<ConnectionMode>auto-home</ConnectionMode>
<Context>
<AccessString>apn123.company.com</AccessString>
<UserLogonCred>
<UserName>Fred</UserName>
<Password>Bloggs</Password>
</UserLogonCred>
<Compression>DISABLE</Compression>
<AuthProtocol>NONE</AuthProtocol>
</Context>
</MBNProfile>
[/code]
Thanks,<br/>


View the full article
 
Back
Top