|
Re: [xml-dev] importing and accessing data - redux
|
[
Lists Home |
Date Index |
Thread Index
]
In a message dated 07/12/01 21:56:35 GMT Standard Time, paul@freedmania.com writes:
On the offchance that the only person who knows the answer didn't see
this earlier, I'm posting it again. I apologise for the redundancy; the
answer may be real important to this job.
I am a newcomer to xml and to this list. I hope this is the place for
basic questions, or if not then at least the place to learn where to ask
them. Please let me know if I'm being inappropriate, too.
I have a small database with two tables of about 250 records each. One
table is a glossary with two fields, "word" and "definition". The other
is a directory called 'papers', containing five fields. All the data is
string. Nothing, including the definitions, is longer than 600
characters.
Currently the data resides in 2 tab-delimited .txts.
I want to handle the data with normal database functions: search,
select, sort. I am at a loss as to how to begin. I can't even see
how to import the data into an xml document (or generate a document
with the data in place).
I know that, using Matt Sergeant's DBIx::XML_RDB module, I can access a
mySQL database through Perl. I'm trying to avoid Perl and Java.
My interface, incidentally, is a Shockwave piece built in Macromedia
Director 8.5. I'm trying to not use their database-accessing xtras.
Their XML Parser xtra is known to work, but first I'd need, it seems, an
"XML Database". Building it by hand would defeat my purpose, and leave
me with the problem of building a maintenance device.
Is there a way to use xml as my database here?
Any help will be deeply appreciated.
Paul,
You haven't given us a lot to go on, particularly as to what programming skills you have or don't have.
In general terms you want to parse your tab-delimited documents so that you create XML documents that are well-formed.
Your resulting documents would be of this general form:
<WordAndDef>
<Word>Text to first tab</Word>
<Definition>Text to second tab</Definition>
<Word>Text to third tab</Word>
....
</WordAndDef>
You need to create the document element that I have called <WordAndDef> above to ensure that the XML you create is well-formed.
Assuming that you are able to create two XML documents which are well-formed, then you could use XSLT to query them. But you may not know enough about XSLT to know where to begin.
Does that make any sense?
Andrew Watt
|
|
|
|
|