Evgeniy.co.il 0 Posted August 19, 2014 Report 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 Quote Link to post Share on other sites
L8V2L 5 Posted August 20, 2014 Report Share Posted August 20, 2014 /root/node/[node/@id = 1] 1 Quote Link to post Share on other sites
Evgeniy.co.il 0 Posted August 20, 2014 Author Report 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 Quote Link to post Share on other sites
L8V2L 5 Posted August 20, 2014 Report 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.