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 :)
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'?

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Eitan M - 22 Aug 2007 08:03 GMT
...
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 :)
Eitan M - 22 Aug 2007 13:55 GMT
... should I use xmldom with xmlpath for that, or it may be simplier ?
Thanks :)
> Thanks...
>
[quoted text clipped - 3 lines]
> doesn't exists) : write it automatically ?
> Also - when reading from XML : get a default value, if value not exists ?
<http://commons.apache.org/digester/>