[XML-DEV Mailing List Archive Home]
[Reply To This Message]
Re: importing and accessing data - redux
In a message dated 07/12/01 21:56:35 GMT Standard Time, paul@f... 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
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.
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:
<Word>Text to first tab</Word>
<Definition>Text to second tab</Definition>
<Word>Text to third tab</Word>
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?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please