I have an XML file that is structured as follows:
<root>
<State state="AZ" stateName="Arizona" stateKey="Arizona" >
<menuVirtualPageName>Arizona.html</menuVirtualPageName>
<Region regionKey="GreaterPhoenix" >
<pageName>Phoenix.html</pageName>
</Region>
</State>
</root>
I have been trying to select a state, using a regionKey value. Given that I already have a correct value for "thisState", I write the following Linq query
Dim stateQuery = (From dataStates In dataStatesXML...<Region> Where dataStatesXML...<State>.@stateKey = thisState Select New With {.virtualPageName = dataStates.<menuVirtualPageName>.Value.ToString(), .stateName = dataStates.@stateName.ToString()})
But I always get back an empty query result :( Any ideas or suggestions much appreciated!!!
No comments:
Post a Comment