get/write from XML.

E

Eitan M

Hello.

How can I read neither write from XML ?
(using XMLDOM).

Need sample, please.

Thanks :)
 
E

Eitan M

Thanks...

How can I write to XML, but using it like ini file.

What I mean : when writting to XML - if a node doesn't exists (or the XML
doesn't exists) : write it automatically ?
Also - when reading from XML : get a default value, if value not exists ?

Thanks :)
 
A

Andrew Thompson

Eitan M wrote:

It would really help people to help you, if you sum
up in your initial post "I want to offer X to the end user"
where X is some feature. ..because *
How can I write to XML, but using it like ini file.

..your first post stated 'using XMLDom' or WTE,
whereas it seems you just want to achieve some
particular end.

* Note that I would still like to know what it is you
intend to offer to the end user, because that is
still not clear to me, and I (and presumably others)
cannot 'guess' what is the best strategy to achieve
the ..we don't know *what* you are trying to achieve.
What I mean : when writting to XML - if a node doesn't exists (or the XML
doesn't exists) : write it automatically ?
Also - when reading from XML : get a default value, if value not exists ?

XMLEncoder/XMLDecoder does this for any Java Object
that is (effectively) a bean, a class that provides getters
and setters for the public attributes, possibly default
values, and a 'no args' constructor.

Searching the group for 'XMLEncoder' or similar for code
samples.

But it is not 'XMLDom', so the question comes back to.

What is 'X'?

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200708/1
 
E

Eitan M

....

XMLEncoder/XMLDecoder read the XML sequentially
(XMLDecoder.readObject()).
What I need is reading the XML by element name, and not at the order that
the components appear on screen.

Thanks :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top