|
-
Feb 7th, 2007, 02:55 PM
#1
Thread Starter
New Member
[RESOLVED] Parser Form string using Loops
Need some help? New to VB. Have a form with 3 sections. The question and values are stored in a XML file and style sheet is XSLT being pulled in with ASP classic. What I need to do is Parser the data string so that it can go in my SQL server.
Is there a way to do a loop (because in one section there could be up to 34 questions per group). In my XSL I have a hidden input field that is counting the groups and another that is counting the number of question within that group.
What I need to be parser out is AnswerGroupNumber, AnswerGroupWeight, AnsewerQuestionNumber, AnsewerQuestionWeight, AnswerValue, AnswerComment For each question.
Just need a loop method because there could be a 100 question to this thing.
Names are the same as my SQL table/cols are set up but if I can get it just to write out in html file to start even if it is a text file.
Here is the data string as it is right now:
//Total Group Section
FormGroupCount=3&
//Group1
FormQuestionCount_1=3&
AnswerGroupWeight_1=40&
AnswerQuestionWeight_1_1=35&
AnswerValue_1_1=100&
AnswerComment_1_1=&
AnswerQuestionWeight_1_2=15&
AnswerValue_1_2=0&
AnswerComment_1_2=test+Comments_1_2&
AnswerQuestionWeight_1_3=15&
AnswerValue_1_3=100&
AnswerComment_1_3=&
//Group2
FormQuestionCount_2=3&
AnswerGroupWeight_2=40&
AnswerQuestionWeight_2_1=0&
AnswerValue_2_1=0&
AnswerComment_2_1=test+Comments_2_1&
AnswerQuestionWeight_2_2=0&
AnswerValue_2_2=0&
AnswerComment_2_2=test+Comments_2_2&
AnswerQuestionWeight_2_3=10&
AnswerValue_2_3=100&
AnswerComment_2_3=&
//Group3
FormQuestionCount_3=3&
AnswerGroupWeight_3=40&
AnswerQuestionWeight_3_1=15&
AnswerValue_3_1=0&
AnswerComment_3_1=test+Comments_3_1&
AnswerQuestionWeight_3_2=15&
AnswerValue_3_2=100&
AnswerComment_3_2=&
AnswerQuestionWeight_3_3=15&
AnswerValue_3_3=100&
AnswerComment_3_3=
Hope that is not too much data for you.
BTW if I am not using the right terms please correct me just a coder noob.
Thanks in Advance,
Jonsey
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|