Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - this simple xpath expression doesn't work >Thread Next - Re: this simple xpath expression doesn't work Re: this simple xpath expression doesn't workTo: NULL Date: 4/5/2007 7:09:00 AM
"Coaster" <Coaster@C...> wrote in message
news:eFQ%23eG3dHHA.4688@T......
> 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>
>
>
>
> --------------------------------------------------------------------------------
>
>
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
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
