Syntax:
com.ibi.agents.XDBlankWalk
iIT Service Object:
sreg: Blank [whitespace] elimination
transform: Blank [whitespace] elimination
Description:
The XML standard calls for preserving blanks in element values. As a compliant parser, the iWay Service Manager preserves these spaces as per the standard. In some cases, however, users add superfluous spaces to document element values. This often arises when an XML document is formatted to resemble a printed document and is then passed into the system.
The Blank Elimination service trims these extraneous blank spaces to make future XPATHs or analysis easier.
Parameters:
Parameter |
Description |
---|---|
Method |
Select one of the following options to remove blank spaces:
|
Edges:
The following table lists the available line edges for the Blank Elimination Service (com.ibi.agents.XDBlankWalk).
Line Edge |
Description |
---|---|
OnError |
Error |
OnSuccess |
Success |
OnFailure |
Failure |
OnCustom |
|
OnError |
OnFailure |
OnSuccess |
Example:
For example, given the following input XML document:
<root> <sub> <sub2> hello </sub2> </sub> <sub3>![CDATA[ ]]</sub3> </root>
When the Method parameter is set to All, the following result is generated:
<root><sub><sub2>hello</sub2></sub><sub3>![CDATA[ ]]</sub3></root>
The value of the <sub2> element was trimmed and the whitespace content of the <root> and <sub> elements was eliminated. Notice, however, that the whitespace inside the CDATA node was ignored.
When the Method parameter is set to Empty, the following result is generated:
<root><sub><sub2> hello </sub2></sub><sub3>![CDATA[ ]]</sub3></root>
The document is treated just as above, except that in this case, the value of the <sub2> element is not trimmed.