manishi Posted September 27, 2006 Share Posted September 27, 2006 What XPath expression will find all page elements that contain child page elements within the following XML fragment? <site> <page id="000"/> <page id="001"> <page id="001_000"> <link target="003_000"/> </page> <page id="001_001"/> </page> <page id="002"/> <page id="003"> <page id="003_000"/> <page id="003_001"/> </page></site> A.//page/page B.//page/@page C.//page[count(*) > 0] D.//page I was thinking of answer "D".just based on theory.Please confirm which is the correct answer.Also if anybody knows how to test these then please let me know. Link to comment Share on other sites More sharing options...
boen_robot Posted September 27, 2006 Share Posted September 27, 2006 You can test XPath expressions by simply creating an XSLT file to style the XML and use the XPath expression in a value-of. How to do that? Normally, I would have offered code, but for your quiz's sake... read. 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