.xmlDataSize()

Method checks the combined lenght of child element values.

Description of the method

Description: xmlDataSize method checks the combined lenght of child element values. This method is for some special purposes where only the data lenght matters.
Available for: any
Parameters: -
Return type: integer

Example

Context: HeaderType1
OCL: self.xmlDataSize() = 24
Description: The example rule checks the combined lenght of element values from PartyIdentification child elements.

 

The XML snippet below would pass this check.

<Header>
  <Id>aId</Id>
  <TimeStamp>2015-07-03T12:17:50</TimeStamp>
  <ControlSum>2</ControlSum>
  <NumberOfTransactions>1</NumberOfTransactions>
</Header>


The following data is taken into account when calculating the length in the above example "aId2015-07-03T12:17:5021". So elements and pretty printing is removed and only the data is left for the length calculation.

Attached you can find example schema and files which you can use for testing:

XMLDataSizefile.xml

Studio_manuals_example_schema.xsd