public class XMLPathUpdater extends Object
Constructor and Description |
---|
XMLPathUpdater() |
Modifier and Type | Method and Description |
---|---|
static void |
update(File xmlResource,
URI oldPath,
String locationXPath,
boolean includeWebResources,
IOReporter reporter)
Updates the specified resource file.
The specified file xmlResource , which was originally placed
at oldFile gets updated. |
public static void update(File xmlResource, URI oldPath, String locationXPath, boolean includeWebResources, IOReporter reporter) throws IOException
xmlResource
, which was originally placed
at oldFile
gets updated. All node values found by the XPath
expression locationXPath
get copied (and the node values are
updated accordingly) to a new relative path (except for web resources if
includeWebResources
is false). The copied files are then
checked the same way.xmlResource
- the XML resource file that gets updatedoldPath
- its original location, may be null
in case it
didn't exist beforelocationXPath
- a XPath expression to find nodes that should be
processedincludeWebResources
- whether web resources should be copied and
updates, tooreporter
- the reporter of the current IO process where errors
should be reported toIOException
- if an IO exception occursBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a