Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 23rd, 2006, 08:23 AM
Authorized User
Points: 285, Level: 5
Points: 285, Level: 5 Points: 285, Level: 5 Points: 285, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Text String to XML

Hi folks,

The problem I have got is.....A user input some string i.e. "sp_list, anne, cook"

Format being <stored procedure name>, <parm1>, <parm2>.

Then they click submit and I need to be able to parse this into an xml document.

Anyone got any ideas?

Thanks

  #2 (permalink)  
Old November 27th, 2006, 06:26 AM
Authorized User
Points: 285, Level: 5
Points: 285, Level: 5 Points: 285, Level: 5 Points: 285, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have got the program to accept an xml string into a text box. It then takes the string and puts it into an xml document.

Code:
<API_REQUEST>
<NAME>SP_TEST</NAME>
<PARAMETERS>
<param1>1</param1>
<param2>2</param2>
<param3>3</param3>
</PARAMETERS>
</API_REQUEST>
Above is what the XML document looks like.

Now what I need to do is to read through the document and pull out the NAME, and ParamX. I can pull out the NAME without a problem, but I need to be able to loop through the PARAMETERS and pull out all the different parameters and create a varible for each paramter. Unfortunately the amount of parameters is going to change.

If anyone has got any ideas or code snippets that would be great.

Thanks!!!!



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing from a text string jroxit Classic ASP Basics 5 November 18th, 2008 05:08 PM
Creating XML doc ; writing string(xml format) into KamalRaturi XML 5 May 28th, 2008 05:51 AM
Text String to XML testsubject XML 1 November 26th, 2006 06:50 PM
Parsing a text string medix_911 Access 8 November 21st, 2006 01:37 PM
Finding a string in the text muki XSLT 5 November 15th, 2005 11:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.