Evgeniy.co.il Posted August 19, 2014 Share Posted August 19, 2014 i have Xml that looks something like this: How can i filtering this xml for cb="1" ? I know only xpath & DataSet are ways for filtering this xml: <root> <node id="1"> <node cb="0"></node> <node cb="0"></node> </node> <node id="2"> <node id="21" cb="0"></node> <node id="22" cb="1"></node> </node> </root> What the most efficient way to make it like (filter by cb=1): enter code here <root> <node id="2"> <node id="22" cb="1"></node> </node> </root> With regards, Evgeniy Vinnikov Link to comment Share on other sites More sharing options...
L8V2L Posted August 20, 2014 Share Posted August 20, 2014 /root/node/[node/@id = 1] 1 Link to comment Share on other sites More sharing options...
Evgeniy.co.il Posted August 20, 2014 Author Share Posted August 20, 2014 (edited) Thank you very mach ADHD, it was very helplfully, Regards, Evgeniy Edited August 20, 2014 by Evgeniy.co.il Link to comment Share on other sites More sharing options...
L8V2L Posted August 20, 2014 Share Posted August 20, 2014 (edited) Your welcome. And thank you for the like!Programming is an art, so there's many ways this could have been done. It pay to span time with the language, via either reading on it, or playing with it.Happy programming! ;-) Edited August 20, 2014 by L8V2L Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now