3
// Obtém a tag "tags"
if(xmlDoc.ChildNodes[1].ChildNodes[1].ChildNodes[1].SelectSingleNode("tags") != null)
{
}
I am running an Xml and in some we do not have this tag "tags" and error.
Does anyone know another way to validate this ?
3
// Obtém a tag "tags"
if(xmlDoc.ChildNodes[1].ChildNodes[1].ChildNodes[1].SelectSingleNode("tags") != null)
{
}
I am running an Xml and in some we do not have this tag "tags" and error.
Does anyone know another way to validate this ?
3
var node = xmlEnvio.GetElementsByTagName("tag").OfType<XmlNode>();
if (node != null && node.Count() > 0)
{
foreach (XmlNode item in node)
{
if (item["tags"] != null)
{
//Código
}
}
}
I use this form to validate us.
Browser other questions tagged c# xml
You are not signed in. Login or sign up in order to post.