[ale] Parsing XML into MySQL ( was C_not ( or C_hashmark ( or C_pounded (or C something or other) ) )

Mike Millson mgm at atsga.com
Thu Sep 26 09:16:52 EDT 2002


Aaron,

Here are some resources that helped me:

1) When to use SAX or DOM:
http://developerlife.com/saxvsdom/default.htm

2)SAX Tutorial:
http://developerlife.com/saxtutorial1/default.htm

There are some other links on this site's home page that may be useful:
http://developerlife.com/default.htm

I have never used DOM, as SAX has been better suited to what I was doing,
which was basically using XML feeds as a read only database to display
information. I used Java's JAXP class, which is a wrapper that allows you to
change our parsers easily. One thing I learned that I'll pass along is to
use a StringBuffer to in the characters method because it could take
multiple calls to the characters method to get the data. I noticed on Linux
it didn't, but on FreeBSD, this was an issue.

Also, I wasn't storing the XML data in MySQL. I meant I have used Java to
interface w/ 3 different types of data sources: MySQL, Oracle, and XML.

Mike

-----Original Message-----
From: aaron [mailto:aaron at pd.org]
To: ale at ale.org
Sent: Thursday, September 26, 2002 12:14 AM
To: mgm at atsga.com
Cc: ale at ale.org
Subject: Re: [ale] Parsing XML into MySQL ( was C_not ( or C_hashmark (
or C_pounded (or C something or other) ) )


On Wednesday 25 September 2002 20:49, you wrote:
> I concur. I don't see any evidence of Java being slow or limited (on
> Linux or in general). I have used Java + Tomcat 4.x to interface w/
> MySQL and Oracle databases and parse large XML feeds and have been very
> impressed.

Sorry for the sideline strand off this C_not thread, but I was going to
post this query anyway when Mike mentioned Java parsing of XML for MySQL:

The background is that one of the regular exercises and assignments in a
peer instruction Java class I joined is to create practice test questions
for classmates from the chapter and section material being covered.

The group leaders will enter these questions in an existing MySQL
database so that that future classes can generate practice tests from
them. Naturally, it would be very helpful if the entry data process could
be automated. The procedure being suggested is to have students submit
questions in XML formatted text files (after formulating an appropriate
schema, of course)  and then parse the XML documents into the MySQL
database.

A reasonable approach and a few of the group leaders have MySQL
experience, but we are not all that strong on XML (part of the reason for
the choice, actually... learn while you burn) and none of us have direct
experience with parsing XML into MySQL.

I was thinking some of the folk here might be able to provide a few
pointers, ideas, references or links to existing Open Source solutions
for approaching this plan. As always, any assistance will be appreciated!

peace
aaron




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list