Hi everyone,
I have been fishing around on other forums and have found a really easy
(DOS command) way of 'grabbing' directory trees ...
dir c:\mydir /a:d /b /s>dirs.txt
It was a big relief to find that.
And regarding directory trees, I think I will first try an adapted
version of Fedro's HTML suggestion. Mine would include files and
properties and would look something like the following ...
<root>
<startdir>mylocaldir1
<dir>dir1
<file>file1
<creationdate>20060211</creationdate>
<owner>John Smith</owner>
</file>
<file>Another file
</file>
</dir>
<dir>Another directory
<file>Yet another file
</file>
</dir>
</startdir>
</root>
I would store complete directory paths which might get a bit long but at
this stage, simplicity is probably the best. I'll then see how my
navigation mechanisms pan out and may need to review the structure.
Indeed, I am even pondering storing a parallel XML file in the more
'pure' (fragmented) format, containing a link ID that would enable
navigation to be based on the 'pure' XML and then information retrieval
using the HTML style structure.
Thanks for your tips and comments as these have really helped to get me
thinking about the problem.
And I hope that my feedback is useful for you?
All the best,
Alan Searle.
Andy Dingley schrieb:
On Sun, 19 Feb 2006 18:49:05 +0100, Tjerk Wolterink
<tj***@wolterinkwebdesign.com> wrote:
You can view directories as files too.
Not a good idea in XML though. The idea that "directories are a funny
sort of file" is an artefact of some _implementations_ of file systems.
As far as data modelling goes it's not the sort of coincidental factor
that should be preserved into a more abstract representation.
For one thing (and relevant to XML / DTD design) what should the content
model be for the children of this "file or directory" node ? Does it
have child nodes (as a directory does) or not (as a file does) ?
"Borrowing" HTML elements is bad software design too because it's
confusing the fact that these are entirely separate elements because
they're taken from separate namespaces. Relying on copy-of working and
giving the elements matching local-name() properties is piss-poor
software engineering. Look up a textbook from back when such things were
last taught (1980s ?) and lookup the concept of "coupling".