Page last modified 11:55, 23 Oct 2015 by juhako

.xmlDataSize() Redirected from User Guides/myXML/5: OCL Rules/Available methods for OCL base types/.xmlDataSize()

    Table of contents

    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 lenght calculation.

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

    Menu