Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


this simple xpath expression doesn't work

From: "Coaster" <Coaster@-------.--->
To: 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>



--------------------------------------------------------------------------------





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent