Extremely simple XML

Discussion in 'Java' started by loquak, Apr 11, 2004.

  1. loquak

    loquak Guest

    Hello there.

    Instead of writing a custom format, I've thought about implementing the data
    in XML. There's nothing fancy in the database, all I need is <data> </data>
    tags between which I'll put all the elements.

    Like this:

    <item>
    <weight> 60kg </weight>
    <volume> 50l </volume>
    ....etc
    </item>

    No headers, attributes etc. are needed. I've got a few days time to
    implement this, so the question is, does Java come with classes for simple
    xml parsing without having to trouble with all the "fancy" stuff involved?
    If not, I'll implement my own data format :) If yes, where should I start
    from?

    Thanks!

    (Borland JBuilder 9.0)
     
    loquak, Apr 11, 2004
    #1
    1. Advertising

  2. loquak wrote:

    > Hello there.
    >
    > Instead of writing a custom format, I've thought about implementing the
    > data in XML. There's nothing fancy in the database, all I need is <data>
    > </data> tags between which I'll put all the elements.
    >
    > Like this:
    >
    > <item>
    > <weight> 60kg </weight>
    > <volume> 50l </volume>
    > ...etc
    > </item>
    >
    > No headers, attributes etc. are needed. I've got a few days time to
    > implement this, so the question is, does Java come with classes for simple
    > xml parsing without having to trouble with all the "fancy" stuff involved?
    > If not, I'll implement my own data format :) If yes, where should I start
    > from?
    >
    > Thanks!
    >
    > (Borland JBuilder 9.0)


    http://java.sun.com/xml/tutorial_intro.html


    --
    Kind regards,
    Christophe Vanfleteren
     
    Christophe Vanfleteren, Apr 11, 2004
    #2
    1. Advertising

  3. loquak

    loquak Guest

    "Christophe Vanfleteren" <> wrote in message
    news:5O6ec.67224$-ops.be...
    > loquak wrote:
    >
    > > Hello there.
    > >
    > > Instead of writing a custom format, I've thought about implementing the
    > > data in XML. There's nothing fancy in the database, all I need is <data>
    > > </data> tags between which I'll put all the elements.
    > >
    > > Like this:
    > >
    > > <item>
    > > <weight> 60kg </weight>
    > > <volume> 50l </volume>
    > > ...etc
    > > </item>
    > >
    > > No headers, attributes etc. are needed. I've got a few days time to
    > > implement this, so the question is, does Java come with classes for

    simple
    > > xml parsing without having to trouble with all the "fancy" stuff

    involved?
    > > If not, I'll implement my own data format :) If yes, where should I

    start
    > > from?
    > >
    > > Thanks!
    > >
    > > (Borland JBuilder 9.0)

    >
    > http://java.sun.com/xml/tutorial_intro.html
    >

    Yep, this SAX stuff worked perfectly. At a first glance looked terribly
    complicated, but now it really couldn't be easier. :)
     
    loquak, Apr 11, 2004
    #3
  4. loquak

    Yi Chen Guest

    "loquak" <> дÈëÏûÏ¢ÐÂÎÅ
    :c5ar6q$6d8$...
    > Hello there.
    >
    > Instead of writing a custom format, I've thought about implementing the

    data
    > in XML. There's nothing fancy in the database, all I need is <data>

    </data>
    > tags between which I'll put all the elements.
    >
    > Like this:
    >
    > <item>
    > <weight> 60kg </weight>
    > <volume> 50l </volume>
    > ...etc
    > </item>
    >
    > No headers, attributes etc. are needed. I've got a few days time to
    > implement this, so the question is, does Java come with classes for simple
    > xml parsing without having to trouble with all the "fancy" stuff involved?
    > If not, I'll implement my own data format :) If yes, where should I start
    > from?
    >
    > Thanks!
    >
    > (Borland JBuilder 9.0)
    >


    Check out JDOM. It was designed for Java progrogramming
    language. I think it is easier to use then
    SAX and DOM.

    -Y.C.
    http://www.OneImageHost.com
     
    Yi Chen, Apr 12, 2004
    #4
  5. "loquak" <> wrote in message
    news:c5ar6q$6d8$...
    > Hello there.
    >
    > Instead of writing a custom format, I've thought about implementing the

    data
    > in XML. There's nothing fancy in the database, all I need is <data>

    </data>
    > tags between which I'll put all the elements.
    >
    > Like this:
    >
    > <item>
    > <weight> 60kg </weight>
    > <volume> 50l </volume>
    > ...etc
    > </item>
    >
    > No headers, attributes etc. are needed. I've got a few days time to
    > implement this, so the question is, does Java come with classes for simple
    > xml parsing without having to trouble with all the "fancy" stuff involved?
    > If not, I'll implement my own data format :) If yes, where should I start
    > from?
    >
    > Thanks!
    >
    > (Borland JBuilder 9.0)


    Have you looked at http://www.adtxml.com/ for your XML format? It would
    allow your data more flexibility.

    -
    Christopher Diggins
    http://www.cdiggins.com
    http://www.heron-language.com
     
    christopher diggins, Apr 12, 2004
    #5
  6. Take a look the article "Build Your Own Lightweight XML DOM Parser "
    at http://www.sunwesttek.com/wpapers.html. It is extremely lightweight
    and easy to use. For your situation, you may also want to take a look
    at "XMLConfig". Both are free to use.

    Hope this helps,

    Thanks,
    Guang Yang,
    Sunwest Technologies,
    http://www.SunwestTek.com

    "loquak" <> wrote in message news:<c5ar6q$6d8$>...
    > Hello there.
    >
    > Instead of writing a custom format, I've thought about implementing the data
    > in XML. There's nothing fancy in the database, all I need is <data> </data>
    > tags between which I'll put all the elements.
    >
    > Like this:
    >
    > <item>
    > <weight> 60kg </weight>
    > <volume> 50l </volume>
    > ...etc
    > </item>
    >
    > No headers, attributes etc. are needed. I've got a few days time to
    > implement this, so the question is, does Java come with classes for simple
    > xml parsing without having to trouble with all the "fancy" stuff involved?
    > If not, I'll implement my own data format :) If yes, where should I start
    > from?
    >
    > Thanks!
    >
    > (Borland JBuilder 9.0)
     
    Sunwest Technologies, Apr 12, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    4
    Views:
    507
  2. Mike Lundell

    extremely simple question

    Mike Lundell, Jul 29, 2003, in forum: C++
    Replies:
    1
    Views:
    283
    Tim Slattery
    Jul 30, 2003
  3. Mike Lundell

    Extremely Simple Question

    Mike Lundell, Jul 29, 2003, in forum: C++
    Replies:
    10
    Views:
    583
    Big Brian
    Jul 30, 2003
  4. Aaron Watters
    Replies:
    26
    Views:
    597
    Aaron Watters
    Jan 6, 2004
  5. James

    Reporting Woes (extremely simple)

    James, Aug 4, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    246
    Munna
    Aug 5, 2008
Loading...

Share This Page