"Coaster" <Co*****@Coaster.netwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
>
I'm reading a csproj file trying to extract info via xpath and this first
one works fine
xmlNode =
xmlDoc.SelectSingleNode("/def:Project/def:PropertyGroup[1]/def:OutputType/text()",nsMgr);
but this one doesn't and the only change is the key name and that is
present. The xml is pasted below
xmlNode =
xmlDoc.SelectSingleNode("/def:Project/def:PropertyGroup[1]/def:AssemblyName/text()",
nsMgr);
I switch them around and run the second one first or even comment out the
first one and it still doesn't work (I mention that because I was reading
another post where someone was saying something about the node is removed
from the document and wouldn't be present for the second selectsinglenode,
not sure what thats about)
thanks
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{106C49F4-4260-4A70-A362-84AF2DA95766}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WelcomeEmail</RootNamespace>
<AssemblyName>WelcomeEmail</AssemblyName>
</PropertyGroup>
Actually both don't work, my mistake. I had them working when I did a
SelectNodes call, I guess I'm not understanding the xpath very well
>
--------------------------------------------------------------------------------