Class InputSettings
java.lang.Object
org.libxmq.InputSettings
Used to configure the parser behaviour when parsing XMQ.
Example:
InputSettings is = new InputSettings().setImplicitRoot("config").setTrimNone();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the previously set trim none.booleanReturns the previously set no merge.booleanReturns the previously set trim none.Set the implicit root when parsing XMQ.setNoMerge(boolean b) Disable automatic merging of text noes when loading document.setTrimNone(boolean b) Disable whitespace trimming using the xmq heuristic when loading xml/html.
-
Constructor Details
-
InputSettings
public InputSettings()Construct an default input settings.
-
-
Method Details
-
setImplicitRoot
Set the implicit root when parsing XMQ. Normally XML requires an explicit root element. However when loading an expected configuration file in XMQ the root can be explicit (eg "config"). This means that an XMQ config file can be as simple as a list of key=value pairs.Example:
speed=123 type=car- Parameters:
r- The implicit root to add, eg "config".- Returns:
- this
InputSettingsinstance, for method chaining
-
getImplicitRoot
-
setTrimNone
Disable whitespace trimming using the xmq heuristic when loading xml/html.- Parameters:
b- True means keep all whitespace as-is.- Returns:
- this
OutputSettingsinstance, for method chaining
-
getTrimNone
public boolean getTrimNone()Returns the previously set trim none.- Returns:
- the trim none status
-
setNoMerge
Disable automatic merging of text noes when loading document.- Parameters:
b- True means keep text nodes separate when loading from xmq.- Returns:
- this
OutputSettingsinstance, for method chaining
-
getNoMerge
public boolean getNoMerge()Returns the previously set no merge.- Returns:
- the no merge status
-