Please check main xml file present in below,check once
Bangalore
Hyderabad
2
Odisha
Hyderabad
MY REquirement is :
This is my xml file.with TP Version 1.0 & 2.0.I am using code for load xml file to dataset
ds.ReadXml(filename);//Filename is the path of xml file.
so its loaded ATLAS,TP,Procedure,Test,History table in dataset not consider about the Tp attribute Version No.
My requirement is i want to load same table but only particular Version related data :
suppose Version=1.0
I want only
Bangalore
Hyderabad
2
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dipankar BiswasPosted May 18, 2015, 10:20 AM
priyaranjan pandaPosted May 18, 2015, 9:14 AM
XPathDocument doc = new XPathDocument(fileName);
XPathNavigator nav = doc.CreateNavigator();
XPathExpression expr;
expr = nav.Compile("/ATLAS/TP[@VERSION='"+VersionNumber+"']");
XPathNodeIterator iterator = nav.Select(expr);//here xml file is null
DataTable dt= new DataTable();
while (iterator.MoveNext())//here only xm file loaded accourding to Version
{
//iterator.Current.Innerxml having VERSION attribute wise xml file.
//Now how to bind this xml file in Datatable dt.
}
Sanjeeb LenkaPosted May 18, 2015, 5:33 AM