Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: this simple xpath expression doesn't work this simple xpath expression doesn't workTo: NULL Date: 4/5/2007 7:00:00 AM
Hi
I'm reading a csproj file via c# 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>
--------------------------------------------------------------------------------
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
