public class XmlTransformer extends org.apache.commons.io.DirectoryWalker<File>
Constructor and Description |
---|
XmlTransformer(FileFilter filterToMatch,
String xslResource)
Construct an updater to match DocBook XML files.
|
XmlTransformer(String xsl,
FileFilter filterToMatch)
Construct an updater to match DocBook XML files.
|
Modifier and Type | Method and Description |
---|---|
protected void |
handleFile(File file,
int depth,
Collection<File> results)
Update files that match, adding them to the results.
|
List<File> |
update(File startDirectory)
Update files that match the filter.
|
public XmlTransformer(FileFilter filterToMatch, String xslResource)
The files are updated in place.
The XSL resource must be on the classpath, and so you probably want to extend this with your own transformer class.
filterToMatch
- Filter to match XML files.xslResource
- Path to XSL resource.public XmlTransformer(String xsl, FileFilter filterToMatch)
The files are updated in place.
filterToMatch
- Filter to match XML files.xsl
- XSL as string.public final List<File> update(File startDirectory) throws IOException
startDirectory
- Base directory under which to update files, recursivelyIOException
- Something went wrong changing a file's content.protected final void handleFile(File file, int depth, Collection<File> results) throws IOException
handleFile
in class org.apache.commons.io.DirectoryWalker<File>
file
- File to updatedepth
- Not usedresults
- List of files updatedIOException
- Something went wrong changing a file's content.Copyright © 2025 Open Identity Platform Community. All rights reserved.