Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
XMLGetInnerText
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace XMLSK
{
///by: Bernardo Godinho <bernardo.godinho.oliveira@gmail.com>
static class XMLhl
{
public static string GetInnerText(XmlNode node, string[] path)
{
try
{
string retu = "";
XmlNode nod = node;
foreach (string item in path)
{
if (nod == null) return "";
nod = nod[item];
}
if (nod == null) return "";
retu = nod.InnerText;
return retu;
}
catch
{
return "";
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.