So I have an if statement in my code that is returning false, and I have no idea why.
This is the statement:
if (readAircraftXml.NodeType == XmlNodeType.Element && readAircraftXml.Name == "Aircraft" && readAircraftXml.HasAttributes)
{
//The action I wanna perform
}
And this is my XML, this if statement is for:
<My project name>
<Aircraft id="B789">
<Another element>content</Another element>
</My project name>
Now my question is, why is the if statement not returning true? The node this is all about is an element, it has the name "Aircraft" and it also has attributes. I have googled this issue but unfortunaly didn't find anything that fixed it.
Aucun commentaire:
Enregistrer un commentaire