Discuss this help topic in SecureBlackbox Forum

TElXMLSOAPClient.OnFormatElement

TElXMLSOAPClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


This event is fired during processing of an XML node.

Declaration

[C#]
    event TSBXMLFormatElementEvent OnFormatElement;
    delegate void TSBXMLFormatElementEvent(Object Sender, TElXMLDOMElement Element, int Level, string Path, ref string StartTagWhitespace, ref string EndTagWhitespace);

[VB.NET]
    Event OnFormatElement As TSBXMLFormatElementEvent
    Delegate Sub TSBXMLFormatElementEvent(ByVal Sender As Object, ByVal Element As TElXMLDOMElement, ByVal Level As Integer, ByVal Path As String, ByRef StartTagWhitespace As String, ByRef EndTagWhitespace As String)

[Pascal]
    property OnFormatElement : TSBXMLFormatElementEvent;
    TSBXMLFormatElementEvent = procedure(Sender : TObject; Element : TElXMLDOMElement; Level : Integer; const Path : XMLString; var StartTagWhitespace, EndTagWhitespace : XMLString) of object;

[C++]
    void get_OnFormatElement(TSBXMLFormatElementEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnFormatElement(TSBXMLFormatElementEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBXMLFormatElementEvent)(void * _ObjectData, TObjectHandle Sender, TElXMLDOMElementHandle Element, int32_t Level, const sb_char16_t * pcPath, int32_t szPath, sb_char16_t * pcStartTagWhitespace, int32_t &szStartTagWhitespace, sb_char16_t * pcEndTagWhitespace, int32_t &szEndTagWhitespace);

[PHP]
    TSBXMLFormatElementEvent|callable|NULL get_OnFormatElement()
    void set_OnFormatElement(TSBXMLFormatElementEvent|callable|NULL $Value)
    callable TSBXMLFormatElementEvent(TObject $Sender, TElXMLDOMElement $Element, integer $Level, string $Path, string &$StartTagWhitespace, string &$EndTagWhitespace)

[Java]
    TSBXMLFormatElementEvent getOnFormatElement();
    void setOnFormatElement(TSBXMLFormatElementEvent Value);
    TSBXMLFormatElementEvent.Callback OnFormatElement = new TSBXMLFormatElementEvent.Callback() {
        public void TSBXMLFormatElementEventCallback(TObject arg0, TElXMLDOMElement arg1, int arg2, String arg3, TElXMLFormatElementParams arg4) {
            //...
        }
    }

Parameters

  • Element - the XML Element being fomatted.
  • EndTagWhitespace - string which specifies whitespace before current closing tag.
  • Level - nesting level of the current XML element.
  • Path - path to the current XML element.
  • StartTagWhitespace - string which specifies whitespace at the beginning of the current tag.
  • pcPath - path to the current XML element.
  • szPath - the length of pcPath.
  • pcStartTagWhitespace - string which specifies whitespace at the beginning of the current tag.
  • szStartTagWhitespace - the length of pcStartTagWhitespace.
  • pcEndTagWhitespace - string which specifies whitespace before current closing tag.
  • szEndTagWhitespace - the length of pcEndTagWhitespace.

Description

This event is fired when a message is being saved. The event handler could be used to format the output, e.g., add whitespaces before each XML element.

See also:     OnFormatText    

Discuss this help topic in SecureBlackbox Forum