Jump to content

Xml Attributes And Node Data Using Xslt


jrreedy16
 Share

Recommended Posts

Anyone have any suggestions on some XSLT I can write to pull the data out of the nodes using the attributes for each node? I know it's ugly, but I'm out of ideas.

 <AnswerSet>    <Answer firstName="FName">asdfa</Answer>    <Answer lastName="LName">asdf</Answer>    <Answer userEmail="Email">asdf</Answer>    <Answer userFeedback="Description">asdf sdfsdf</Answer>  </AnswerSet>  <AnswerSet>    <Answer firstName="FName">r</Answer>    <Answer lastName="LName">r</Answer>    <Answer userEmail="Email">fgfgf</Answer>    <Answer userFeedback="Description">fgfg</Answer>  </AnswerSet>

Link to comment
Share on other sites

Here is an alternative way of going about the XML structure, possibly using recursive XSL to extract the data? :) <AnswerSet><Answer questionId="FName">asdfa</Answer><Answer questionId="LName">asdf</Answer><Answer questionId="Email">asdf</Answer><Answer questionId="Description">asdf sdfsdf</Answer></AnswerSet><AnswerSet><Answer questionId="FName">r</Answer><Answer questionId="LName">r</Answer><Answer questionId="Email">fgfgf</Answer><Answer questionId="Description">fgfg</Answer></AnswerSet>

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
 Share

×
×
  • Create New...