Results 1 to 3 of 3

Thread: xml-java

  1. #1
    Join Date
    Jan 2005

    Unanswered: xml-java

    I Have a xml file and I want to read it and import to mysql the values of xml file.
    It is good to use a xml parser (and what may be better) or just to uses the libraries of jdk?
    The records of xml file is about 55000 as I know.

  2. #2
    Join Date
    Oct 2002
    Baghdad, Iraq
    You'd want to use an event-based parser that conforms to the SAX protocol. As I recall it is included at least with JDK 1.5.

    DOM parsers are easier to use, but they load the whole document into memory which you don't really need to do. All you care about is when the appropriate tags are encountered.

  3. #3
    Join Date
    Jul 2008
    you can use xpath expression with jaxen library (i thing there is another one from apache called xpath as well) and then you can query the tags instead of implementing your own reading, i think it would be faster.

    Hope it helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts