Monday

C# source to find XML tag recursively


 [TestFixture]
public class test
{
[Test]
public void XPathTest()
XmlDocument doc = new XmlDocument();
doc.Load(@"c:\LinqObjects.xsd");

foreach (XmlNode node in doc.DocumentElement.ChildNodes)
{
ProcesNode(node, doc.DocumentElement.Name);
}
}



private void ProcesNode(XmlNode node, string parentPath)
{
if (!node.HasChildNodes || ((node.ChildNodes.Count == 1) && (node.FirstChild is System.Xml.XmlText)))
{
if (node.Name == "Parameter")
{
//System.Diagnostics.Debug.WriteLine(parentPath + "/" + node.Name);
}
}
else
{
foreach (XmlNode child in node.ChildNodes)
{
ProcesNode(child, parentPath + "/" + node.Name);
}
}
}
}

more...

No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...