|
-
Aug 31st, 2003, 02:02 PM
#1
Thread Starter
yay gay
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/
-
Aug 31st, 2003, 03:58 PM
#2
Sleep mode
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 .
-
Aug 31st, 2003, 04:10 PM
#3
Thread Starter
yay gay
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/
-
Sep 1st, 2003, 04:21 PM
#4
Thread Starter
yay gay
\m/  \m/
-
Sep 2nd, 2003, 09:56 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|