Pulling vars from a text file

Results 1 to 2 of 2

Thread: Pulling vars from a text file

  1. #1
    Join Date
    Dec 1969
    Posts
    1,671

    Default Pulling vars from a text file

    Ok, I want to truly seperate content from structure, but I don&#039t want to use a database for the data. I want it stored in flat text files individually. Currently I have these in a rudimentary XML format, but I need some way to parse the data via ASP and put them into variables. How can I grab the information between two tags so that I can take the following<BR>&#060;stuff&#062;Variable for Stuff&#060;/stuff&#062; and parse it so that strStuff = "Variable for Stuff".<BR><BR>I am kind of new to all of this, so sorry if I am crudding up the advanced board with a basic question.

  2. #2
    Join Date
    Dec 1969
    Posts
    553

    Default RE: Pulling vars from a text file

    An easy way, although not especially clever, would be to determine the length of the string you want, and use the Mid() function.<BR><BR>strStuff = Mid(strStuff, (len(tag1)+1), (len(strStuff)-len(tag2)-len(tag1)))<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •