ralphkaroy
New Member
I try to parse this XML file (config file from Chirpy):\[code\]<?xml version="1.0" encoding="utf-8" ?><root xmlns="urn:ChirpyConfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ChirpyConfig http://www.weirdlover.com/chirpy/chirp.xsd"> <FileGroup Name="Built.debug.js" Minify="false"> <File Path="jquery/jquery-1.7.2.js"/> <File Path="jquery.address/jquery.address-1.4.js" /> </FileGroup></root>\[/code\]with this code:\[code\]var path = Server.MapPath("~/Scripts/ScriptfilesMashup.chirp.config");var file = new XPathDocument(path);var nav = file.CreateNavigator();var nodes = nav.Select("/root/FileGroup/File");\[/code\]but \[code\]nodes\[/code\] is always empty, regardless of how I call the \[code\]nav.Select\[/code\] method. I barely used XPath before so maybe I'm doing it wrong - but what? Only the selector \[code\]*\[/code\] gives me the root node.What would be the selector to get the \[code\]Path\[/code\] Attribute of all \[code\]File\[/code\] nodes?