Package madkit.util
Class XMLUtilities
java.lang.Object
madkit.util.XMLUtilities
XML shortcuts as static methods
- Since:
- MadKit 5.0.2
- Version:
- 0.9
- Author:
- Fabien Michel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of a node containing a launch configuration: "Agent"static final StringThe name of the child node ofAGENTcontaining attributes that have to be set on the agent: "Attributes"static final StringValid attribute of an agent node determining if the launch should be done using the bucket mode.static final StringThe name of the child node ofAGENTcontaining the roles which should be set when using the bucket mode.static final StringValid attribute of an agent node determining the agent class to launch, value is "class"static final StringValid attribute of an agent node : "GUI" in a MDK xml config filestatic final StringValid attribute of an agent node determining the agent log level to be set, the name of the attribute is "logLevel"static final StringThe name of a node containing properties for MaDKit : "MadkitProperties"static final StringName of the root node of MaDKit xml fles, value is "MDK"static final StringValid attribute of an agent node : "nbOfInstances" in a MDK xml config file -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NB_OF_INSTANCES
Valid attribute of an agent node : "nbOfInstances" in a MDK xml config file- See Also:
-
GUI
Valid attribute of an agent node : "GUI" in a MDK xml config file- See Also:
-
ATTRIBUTES
The name of the child node ofAGENTcontaining attributes that have to be set on the agent: "Attributes"- See Also:
-
CLASS
Valid attribute of an agent node determining the agent class to launch, value is "class"- See Also:
-
AGENT
The name of a node containing a launch configuration: "Agent"- See Also:
-
MADKIT_PROPERTIES
The name of a node containing properties for MaDKit : "MadkitProperties" -
LOG_LEVEL
Valid attribute of an agent node determining the agent log level to be set, the name of the attribute is "logLevel"- See Also:
-
MDK
Name of the root node of MaDKit xml fles, value is "MDK"- See Also:
-
BUCKET_MODE
Valid attribute of an agent node determining if the launch should be done using the bucket mode. For instance :
see<Agent class="madkit.xml.XMLBenchTestAgent" nbOfInstances="100000" bucketMode="true"> <Attributes speed="3" i="5" s="blabla"/> </Agent>If theBUCKET_MODE_ROLEtag is used, bucketMode is automatically added and set totrue.AbstractAgent.launchAgentBucket(java.util.List, int, String...)- See Also:
-
BUCKET_MODE_ROLE
The name of the child node ofAGENTcontaining the roles which should be set when using the bucket mode. e.g.<Agent class="madkit.xml.XMLBenchTestAgent" nbOfInstances="100000" bucketMode="true"> <Attributes speed="3" i="5" s="blabla"/> <bucketModeRole community="Tcommunity" group="Tgroup" role="Trole"/> </Agent>- See Also:
-
-
Constructor Details
-
XMLUtilities
public XMLUtilities()
-
-
Method Details
-
getDOM
public static Document getDOM(String xmlFile) throws SAXException, IOException, ParserConfigurationException return the DOM from an xml file.- Parameters:
xmlFile-- Returns:
- the DOM from an xml file or
nullif not found or invalid - Throws:
SAXExceptionIOExceptionParserConfigurationException
-
nodeToString
-