public class ServerConfigXmlDocument extends XmlDocument
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_INDENTATION |
doc| Modifier and Type | Method and Description |
|---|---|
void |
createComment(Element elem,
String comment) |
void |
createComment(String comment) |
void |
createFeature(String name)
Add the given feature to the feature manager element.
|
Element |
createFeatureManager()
Create the feature manager element if it does not already exist
|
void |
createFMComment(Node insertionPoint,
String comment) |
boolean |
createFMComment(String comment) |
void |
createVariableWithValue(Element elem,
String varName,
String varValue,
boolean isDefaultValue) |
void |
createVariableWithValue(String varName,
String varValue,
boolean isDefaultValue) |
Element |
findFeatureManager() |
Node |
findFirstLevelComment(String comment) |
Element |
findServerElement() |
boolean |
hasFirstLevelComment(String comment) |
static ServerConfigXmlDocument |
newInstance()
Create a new Document Object Model for a server configuration file with a single element: server.
|
static ServerConfigXmlDocument |
newInstance(File f)
Create a Document Object Model for a server configuration file and populate it from an existing XML file.
|
boolean |
removeFMComment(String comment) |
addNewlineBeforeFirstElement, createDocument, createDocument, isIndented, isWhitespace, writeXMLDocument, writeXMLDocumentpublic static String DEFAULT_INDENTATION
public static ServerConfigXmlDocument newInstance() throws ParserConfigurationException
ParserConfigurationExceptionpublic static ServerConfigXmlDocument newInstance(File f) throws ParserConfigurationException, SAXException, IOException
f - An XML file to read in and store in the created DOM.ParserConfigurationExceptionSAXExceptionIOExceptionpublic void createComment(String comment)
public boolean createFMComment(String comment)
public boolean removeFMComment(String comment)
public void createVariableWithValue(String varName, String varValue, boolean isDefaultValue)
public void createVariableWithValue(Element elem, String varName, String varValue, boolean isDefaultValue)
public void createFeature(String name)
name - feature namepublic Element createFeatureManager()
public Element findFeatureManager()
public boolean hasFirstLevelComment(String comment)
public Element findServerElement()
Copyright © 2022 the original author or authors.