i see your problem. XNode is for query based xml reading. That sounds weird, but that is what it is. The examples are for XmlNode. XNode is a linq node type. I am not sure why you need to use XNode, if you dont use a single linq expression, then i strongly suggest using XmlReader. For XNode, you will want something like:
(sorry, i tried to fix your code, but its hella confusing)
what this will do is create a XDocument (so you need to load it up with the xml document through a file or whatever), then it goes to all its children with the node name "property" and then select only the ones with an attribute who's name is equal to "path". then assigns it to the XElement which then can produce a value. The first or default will either get the first record that has that path value, or return null. If there are multiple, it will ignore anything beyond the first. Also this code will search as deep as it needs to go, not just the children, i can't remember which item on XDocument is children only. "Decedents" means all nodes inside the element.
XDocument doc = new XDocument();
XElement node = doc.Descendants(XName.Get("property")).Where(n=>n.Attribute(XName.Get("name")=="path").FirstOrDefault();
also, when working with XDocument / XElement / XNode make sure that you use element over node, they are basically the same, only XNode sucks. (imo)
edit:your error is basically saying you are trying to substring (most likely that inner xml) when there is nothing to substring off of. The string is empty or null and you are indexing on it.