homepage Welcome to WebmasterWorld Guest from 50.17.7.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Tangled
ang_bain




msg:3942349
 10:21 am on Jun 29, 2009 (gmt 0)

Hi hope someone can help as my head is now tangled with this one which shouldn't be causing me the headache it is...here goes

I have to flatten my data as i am putting it into database...the structure is something like this

<tag1>
<child1oftag1>
<child2oftag1>

<tag2list>
<tag2>
<child1oftag2>
<child2oftag2>
</tag2>
<tag2>
<child1oftag2>
<child2oftag2>
</tag2>

</tag2list>
<tag3list>
<tag3>
<child1oftag3>
<child2oftag3>
</tag3>
<tag3>
<child1oftag3>
<child2oftag3>
</tag3>
</tag3list>
</tag1>

my xslt currently looks like this
<tag1>
<child1oftag1>
<child2oftag1>
<xsl:for-each select="tag2List/tag2">
<tag1child>
<tag><tag>etc...and the same for secondlist..hope this makes sense

basically what i need is to creat a single row of data for each taggroup within the list tags..eg for every tag2 within tag2list create row which includes the childoftag1..etc..
then i do a selectnodes loop through attaching them to variables and insert into database...but its not working quite right...has anyone any better suggestions...

cheers for any help..

ang

 

ang_bain




msg:3943126
 12:50 pm on Jun 30, 2009 (gmt 0)

changing the way this works...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved