Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Extremely simple XML

Reply
Thread Tools

Extremely simple XML

 
 
loquak
Guest
Posts: n/a
 
      04-11-2004
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)


 
Reply With Quote
 
 
 
 
Christophe Vanfleteren
Guest
Posts: n/a
 
      04-11-2004
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
 
Reply With Quote
 
 
 
 
loquak
Guest
Posts: n/a
 
      04-11-2004

"Christophe Vanfleteren" <(E-Mail Removed)> wrote in message
news:5O6ec.67224$(E-Mail Removed)-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.


 
Reply With Quote
 
Yi Chen
Guest
Posts: n/a
 
      04-11-2004

"loquak" <(E-Mail Removed)> 写入消息新闻
:c5ar6q$6d8$(E-Mail Removed)...
> 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





 
Reply With Quote
 
christopher diggins
Guest
Posts: n/a
 
      04-12-2004

"loquak" <(E-Mail Removed)> wrote in message
news:c5ar6q$6d8$(E-Mail Removed)...
> 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


 
Reply With Quote
 
Sunwest Technologies
Guest
Posts: n/a
 
      04-12-2004
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" <(E-Mail Removed)> wrote in message news:<c5ar6q$6d8$(E-Mail Removed)>...
> 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)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
extremely simple xml parser? Mike Java 4 06-18-2004 12:40 PM
ANNOUNCE: xsdb -- the eXtremely Simple Database goes alpha Aaron Watters Python 26 01-06-2004 02:31 PM
Extremely Simple Question Mike Lundell C++ 10 07-30-2003 07:59 PM
extremely simple question Mike Lundell C++ 1 07-30-2003 12:56 PM



Advertisments