ASP, XML & Database Site

Results 1 to 5 of 5

Thread: ASP, XML & Database Site

  1. #1
    Kevin Hillabolt Guest

    Default ASP, XML & Database Site

    Greetings,<BR><BR>I am developing a complex site that uses all the stuff in the title. Given the nature of my question, I&#039m sure somebody will be able to help me.<BR><BR>Here is the scenerio:<BR>I want to create an ASP page that will allow people to create articles in XML format (I already have the schema and DTD&#039s set up for processing). This is what needs to be accomplished:<BR><BR>1.) Test a directory for the highest article number (file name, in xxxxx.xml format)<BR>2.) After the highest number is found (ex. 00145.xml) create a new XML file 00146.xml<BR>3.) Take information from a browser form and place in structured format in file 00146.xml<BR><BR>I am pretty straight on getting the information put in to a file (#3), it&#039s the test for and creating the new file that is giving me fits. Probably the easiest part I&#039m sure. :(<BR><BR>Can anyone help? Links or Samples would be most appreciated.<BR><BR>TIA,<BR>Kevin Hillabolt<BR>

  2. #2
    Jason Miller Guest

    Default RE: ASP, XML & Database Site

    [Note: I figured out how to do what you want; it&#039s at the bottom. The file system details aren&#039t included since this is the advanced board, but the looping code is, so you should be fine.]<BR><BR>Would it be a more efficient use of system resources to save your XML into an autonumbered database (as opposed to grinding through the file system to get a top value)? Do something along the lines of <BR> select autonumber from xml order by autonumber desc;<BR>[note that there&#039s a rowcount property or something (I don&#039t remember) that will do really nicely for you if you set it to 1.]<BR><BR><BR>ALT Method like what you wanted...<BR> lastnum = 0<BR> set directory = objFSO.getfolder(server.mapPath("/mydir/"))<BR> for each file in directory<BR> myNum = cInt(replace(, ".xml", ""))<BR> if myNum &#062; lastNum then lastNum = myNum<BR> next<BR> currentFile = lastNum + 1<BR> &#039 use expander code here.<BR><BR>Expansion code, if needed<BR> myURL = "" & objRS(0)<BR> for i = 0 to 8 - len(myURL)<BR> myURL = "0" & myURL<BR> next<BR> myURL = myURL & ".xml"<BR>

  3. #3
    Ian Stallings Guest

    Default RE: ASP, XML & Database Site

    Send me your code ;-)<BR><BR>Im just kidding. I just wanted to say that this is a very<BR>cool idea and if most people thought like this it would make<BR>development for all of us allot easier.<BR><BR>Im actually designing something similiar that sends the <BR>xml file as a http post and saves it to a temp xml file on the<BR>server. I then parse it and send it to the database using ADO.<BR>pretty simple stuff but really powerful. Unfortunately in<BR>it&#039s current state it wont be very scalable. I use the<BR>Microsoft IE xml parser and it&#039s not efficient enough.

  4. #4
    Kevin Hillabolt Guest

    Default RE: ASP, XML & Database Site

    Sweet idea - storing in a database. I can&#039t believe I forgot about that. Geez, sometime you get so focused on something...<BR><BR>Dang, now I have to try an figure out that funky XML stuff again.<BR><BR>Thanks for the help...<BR><BR>Kevin

  5. #5
    Join Date
    Dec 1969

    Default XML & SQLServer 2000

    Check out the SQL server preview<BR><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