ProcessMIX Guide
  • Platform Overview
    • Introduction
    • Platform Purpose
    • Main Concepts
      • Organization Structure
      • Visual Language
      • Project Development Environment (IDE)
      • Deployment and Integration
      • Administration and Troubleshooting
    • First Steps
    • Change Log
      • 5.0.0
      • 5.0.5
      • 5.0.5.1
      • 5.0.5.2
      • 5.0.5.3
      • 5.0.5.4
  • Language Reference Guide
    • Overview
    • Data Structures and Types
      • Core Types (pdk.core)
      • Dictionary (pdk.asset.dictionary)
      • Scorecard (pdk.asset.scorecard)
      • Blockchain (pdk.blockchain)
      • Exceptions (pdk.ex)
      • Input/Output (pdk.io)
      • JSON Web Token (pdk.jwt)
      • Networking (pdk.net)
      • HTTP (pdk.net.http)
      • SOAP/Web Services (pdk.net.soap)
      • XML/DOM (pdk.net.xml)
      • S3 (pdk.s3)
      • SQL (pdk.sql)
      • Postgres (pdk.db.postgre)
      • Util (pdk.util)
      • Default Data Structure Field Values
    • Flows
      • Variables
        • Local Flow Variables
        • Node Variables
      • Flow Node Types
        • Core Nodes
          • In
          • Out
          • Assign
          • If
          • Switch
          • Iterator
          • Function Call
          • Subflow
          • Raise Exception
          • Exception Handler
          • Validator
        • Connector Nodes
          • Database Begin Transaction
          • Database Commit Transaction
          • Database Rollback Transaction
          • Database Query Executor
          • EVM Blockchain Functions
          • EVM Blockchain Smart Contract Functions
          • REST Service Executor
          • SOAP Service Executor
          • S3 Connector
          • SMB Connector
      • Expressions
      • Built-In Functions
        • Expression functions
          • pdk.util.Any
          • pdk.util.Array
          • pdk.util.Blockchain
          • pdk.util.Cast
          • pdk.util.Codec
          • pdk.util.Crypto
          • pdk.util.Date
          • pdk.util.File
          • pdk.util.Json
          • pdk.util.JWT
          • pdk.util.Map
          • pdk.util.Math
          • pdk.util.String
          • pdk.util.Util
        • Node functions
          • pdk.flow.Any
          • pdk.flow.Array
          • pdk.flow.File
          • pdk.flow.JsonArray
          • pdk.flow.JsonObject
          • pdk.flow.HttpRequest
          • pdk.flow.HttpResponse
          • pdk.flow.Logger
          • pdk.flow.Map
          • pdk.flow.Xml
            • pdk.flow.xml.XmlAttr
            • pdk.flow.xml.XmlElement
            • pdk.flow.xml.XmlNode
            • pdk.flow.xml.XmlDocument
            • pdk.flow.xml.XmlDocumentType
            • pdk.flow.xml.XmlDOMConfiguration
            • pdk.flow.xml.XmlDOMImplementation
            • pdk.flow.xml.XmlProcessingInstruction
            • pdk.flow.xml.XmlTypeInfo
            • pdk.flow.xml.XmlCharacterData
            • pdk.flow.xml.XmlText
            • pdk.flow.xml.XmlNamedNodeMap
          • pdk.node.BlockchainEth
          • pdk.node.S3
          • pdk.node.Smb
      • Exceptions
        • Checked Exceptions
        • Runtime Exceptions
    • Assets
      • Dictionary
      • Decision Table
      • Scorecard
      • PMML
    • Connectors
      • DB Connector
        • Prepared Query
        • Dynamic Query
        • Query input parameters
        • Stored Procedure
      • REST Connector
      • SOAP Connector
      • S3 Connector
      • SMB Connector
      • EVM Blockchain Connector
    • Global Variables
    • Appendices
      • Overview of Database Transactions
      • Reserved Words
  • Project Development Environment (IDE)
    • Project Explorer Panel
    • Flow Builder
    • Flow Node Editor
    • Data Structure Builder
    • Connector Builders
      • REST Connector Builder
      • SOAP Connector Builder
      • DB (Database) Connector Builder
      • EVM Blockchain Connectors Builder
      • S3 Connector Builder
    • Asset Builders
      • Dictionary Builder
      • Decision Table Builder
      • Scorecard Builder
      • PMML Asset Builder
    • Global Variables Panel
    • Expression Editor
    • Project Deployment and Execution
    • Cron Expression Generator
    • Test Helper
    • Debugging the Project
    • DB transactions
    • Team Collaboration Tools
      • Version Control
      • Conflict Resolver
    • Selectors
    • Error Panel
    • Local History
  • Home and Administration Guide
    • Organization and Subscription
    • Organization Team
    • Repositories and Projects
    • Environments
    • Deployments
    • Database Provisioning
    • Roles and Permissions
  • Logs and Troubleshooting
    • Request/Call Logs
    • Deployment Logs
    • Application Logs
  • Appendix: Example Project
    • Risk Mitigation Solution
Powered by GitBook
On this page
  • Functions
  • getWholeText
  • isElementContentWhitespace
  • replaceWholeText
  • splitText
  1. Language Reference Guide
  2. Flows
  3. Built-In Functions
  4. Node functions
  5. pdk.flow.Xml

pdk.flow.xml.XmlText

contains functions to operate with XML Text variables

Previouspdk.flow.xml.XmlCharacterDataNextpdk.flow.xml.XmlNamedNodeMap

Last updated 1 year ago

This functions are based on Java org.w3c.dom package classes.

You can always rely on Java documentation and examples!

You can use functions from the package for variables of type , as the structure the .

Functions


getWholeText

Returns all text of nodes logically-adjacent text nodes to this node, concatenated in document order. For instance, in the example below wholeText on the node that contains "bar" returns "barfoo", while on the node that contains "foo" it returns "barfoo".

                     +-----+
                     | <p> |
                     +-----+
                       /\
                      /  \
               /-----\    +-------+
               | bar |    | &ent; |
               \-----/    +-------+
                              |
                              |
                           /-----\
                           | foo |
                           \-----/

Arguments:

Result:

Possible exceptions


isElementContentWhitespace

Arguments:

Result:

Possible exceptions


replaceWholeText

Replaces the text of the current node and all logically-adjacent text nodes with the specified text. All logically-adjacent text nodes are removed including the current node unless it was the recipient of the replacement text.

This method returns the node which received the replacement text. The returned node is:

  • null, when the replacement text is the empty string;

  • the current node, except when the current node is read-only;

                     +-----+
                     | <p> |
                     +-----+
                        |
                        |
                     /-----\
                     | yo  |
                     \-----/
 

Figure: barTextNode.replaceWholeText("yo") modifies the textual content of barTextNode with "yo"

Arguments:

Result:

Possible exceptions


splitText

Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. After being split, this node will contain all the content up to the offset point. A new node of the same type, which contains all the content at and after the offset point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the offset is equal to the length of this node, the new node has no data.

Arguments:

Result:

Possible exceptions

text :: - The text

output ::

- throws if the text is NULL

Returns whether this text node contains , often abusively called "ignorable whitespace". The text node is determined to contain whitespace in element content during the load of the document or if validation occurs while using .

text :: - The text

output ::

- throws if the text is NULL

a new node of the same type ( or ) as the current node inserted at the location of the replacement.

For instance, in the above example calling replaceWholeText on the node that contains "bar" with "yo" in argument results in the following:

Where the nodes to be removed are read-only descendants of an , the must be removed instead of the read-only nodes. If any to be removed has descendants that are not , , or nodes, the replaceWholeText method must fail before performing any modification of the document, raising a with the code NO_MODIFICATION_ALLOWED_ERR.

For instance, in the example below calling replaceWholeText on the node that contains "bar" fails, because the node "ent" contains an node which cannot be removed.

text :: - The text

content :: - The content of the replacing Text node.

output :: - The Text node created with the specified content.

- throws if the text or content is NULL

- NO_MODIFICATION_ALLOWED_ERR: Raised if one of the Text nodes being replaced is readonly.

text :: - The text

offset :: - The 16-bit unit offset at which to split, starting from 0.

output :: - The Text node created with the specified content.

- throws if the text or offset is NULL

- INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly

https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/org/w3c/dom/package-summary.html
getWholeText
isElementContentWhitespace
replaceWholeText
splitText
element content whitespace
NullPointerException
NullPointerException
NullPointerException
NullPointerException
pdk.net.xml.Text
pdk.net.xml.Text
Text
Text
CDATASection
Text
EntityReference
EntityReference
EntityReference
EntityReference
Text
CDATASection
DOMException
Text
EntityReference
Element
pdk.net.xml.Text
pdk.net.xml.Text
DOMException
pdk.net.xml.Text
pdk.net.xml.Text
DOMException
pdk.core.String
pdk.core.Boolean
pdk.core.String
pdk.core.Integer
pdk.net.xml.Text
pdk.net.xml.Text
pdk.net.xml.CharacterData
Text
Text
Text
extends
pdk.floe.xml.XmlCharacterData
XmlDocument.normalizeDocument