Wednesday

linq to xml example:


using System.Linq;
using System.Xml.Linq;
[Test]
public void TestMethod1()
{
string xml_str = "<BillingTypes> <BillingType ID=\"1\" Description=\"Statement\" /> <BillingType ID=\"2\" Description=\"Coupon\" /> <BillingType ID=\"3\" Description=\"EFT\" /> <BillingType ID=\"4\" Description=\"Visa\" /> </BillingTypes>";
XDocument xml = XDocument.Parse(xml_str);
var allowed = from billingtype in xml.Elements("BillingTypes").Elements("BillingType")
where billingtype.Attribute("ID").Value == "3"
select billingtype;

foreach (var element in allowed){
Debug.Print(element.Attribute("Description").Value);
}

}

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...