Jump to content

get child-node-names with xpath


Guest rainae

Recommended Posts

hi,my problem is, that i couldn't find out, how i get the names of the nodes which are direct children to another node... i do not want to get their children as well.e.g:

<result>	<video_template>  <title/>  <genre> 	 <choice>action</choice> 	 <choice>comedy</choice> 	 <choice>drama</choice>  </genre>  <rating> 	 <choice>G</choice> 	 <choice>PG</choice>  </rating>  <user_rating> 	 <choice>1</choice> 	 <choice>2</choice>  </user_rating>	</video_template></result>

in this case when i navigate to /result/video_template i want as result something like:titlegenreratinguser_ratinghow can i achieve this?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...