In-Line XML Editor: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * novaordis-utilities =Overview=") |
|||
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
<tt>MutableXMLDocument</tt> is an API that applies in-line configuration modifications in XML files. | |||
A typical usage pattern is the following: | |||
<pre> | |||
File file = ...; | |||
MutableXMLDocument d = new MutableXMLDocument(file); | |||
boolean changeOccurred = d.set("/path/in/document", "value"); | |||
if (changeOccurred) { | |||
d.write(); | |||
} | |||
else { | |||
// | |||
// the value we're trying to set is identical with the value present in the file, react accordingly | |||
// | |||
} | |||
</pre> |
Revision as of 04:45, 11 November 2016
Internal
Overview
MutableXMLDocument is an API that applies in-line configuration modifications in XML files.
A typical usage pattern is the following:
File file = ...; MutableXMLDocument d = new MutableXMLDocument(file); boolean changeOccurred = d.set("/path/in/document", "value"); if (changeOccurred) { d.write(); } else { // // the value we're trying to set is identical with the value present in the file, react accordingly // }