c# - SelectSingleNode with XML Namespace -
my xml below
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <order xmlns="http://example.com/abc"> <class> <about></about> </class> <dataset> <subjects></subjects> </dataset> </order>
i tried access node below ways
xmlnode order = myxml.selectsinglenode("order"); xmlnode subjects= order.selectsinglenode("/order/dataset/subjects); xmlnode dataset= myxml.selectsinglenode("order/dataset");
even tried xml namespace manager below
xmlnamespacemanager nsmgr= new xmlnamespacemanager(myxml.nametable); nsmgr.addnamespace("ab","http://example.com/abc"); xmlnode order= myxml.selectsinglenode("//ab:order", nsmgr); xmlnode dataset= myxml.selectsinglenode("//ab:order//ab:dataset",nsmgr);
where doing wrong here? how access node in case. please me.
Comments
Post a Comment