Results 1 to 5 of 5

Thread: XML question

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    XML question

    i came from vacation and i dont code for about a month..i now want to make a prog that has to store several info about name of files, sizes, etc in a xml and then read it..i want it to be in the following format

    pseudo-code:
    CD_NAME
    +FOLDER_A
    ++FILE1
    +++NAME
    +++SIZE
    ++FILE2
    +++NAME
    +++SIZE
    +FOLDER_B
    etc..did i myself did clear? i cant think very well right now at the moment..sorry..but how should i make so it gets like in that format?
    \m/\m/

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Just an advice , take it if you want or leave it .

    Build a MS access db . Structure this in one table better than the mess you'll have with XML . It store more info , search capabilities , organized , for future development ..etc .

  3. #3

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmm its just for a small program ..i never did anything with access databases and with sql2k i just did a weblog..so i cant see how could i structure it with folders inside folders etc..anyways i'd like to go by the XML way like i've said something like this

    <CD NAME>
    <FOLDER1>
    <FILE1 NAME=Test.Zip Size=100000>
    <FILE2 NAME=Test2.Zip Size=46456>
    </FOLDER1>
    </CD NAME>

    something like this if u understand..whats the way to do it?
    \m/\m/

  4. #4

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    bump!
    \m/\m/

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    So what is the question? What the XML should look like?

    <CD NAME>
    <FOLDER>
    <FILE name="Test.Zip" size="100000">
    <FILE name="Test2.Zip" size="46456">
    </FOLDER>
    </CD NAME>

    Then you could use the XMLDocument to parse it which allows you to search or XQuery according to the heirarchy otherwise you'll need to add an ID type attribute on the file and folder type nodes. Although if you add an ID attribute it might not like it if you start each file set over at 1 and you may have to just keep a continous id for files and another for folders. You'd also have to link the folder id to each file node.

    <CD NAME>
    <FOLDER id="1">
    <FILE id="1" folderid="1" name="Test.Zip" size="100000">
    <FILE id="2" folderid="1" name="Test2.Zip" size="46456">
    </FOLDER>
    </CD NAME>

Posting Permissions

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



Click Here to Expand Forum to Full Width