Folgende
XML:
XML-Code:
<?
xml version="1.0" encoding="UTF-8"?>
<businessRelationship id="1">
<businessSupplier id="1">
Und kein Code:
Code:
public void Load(string BRFile)
{
_xmlFile = BRFile;
try
{
_pathDocument = new XPathDocument(_xmlFile);
XPathNavigator _nav = _pathDocument.CreateNavigator();
if (_nav.SelectSingleNode("businessRelationship") != null)
{
if (_nav.HasAttributes)
{
}
}
_bsi = new BusinessSupplierItem(_pathDocument);
_bsi.GetDetails();
}
catch (
Exception e)
{
throw (e);
}
}
Warum liefert
if (_nav.HasAttributes) false, obwohl ein Attribut vorhanden ist?