API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IHTMLVIEWER_GETELEMTEXT()

Brew Release
Brew MP 1.0.2
See Also
IHtmlViewer IHTMLVIEWER_FindElem() IHTMLVIEWER_GetAttrValue()
Description
This function obtains the text content of an HTML element. Contained elements are ignored, and separate sections of text content (including that of sub-elements) are concatenated.
Params
pIHTMLViewer
[]:
Pointer to the IHtmlViewer interface object.
nElemPos
[]:
The location of the element in the document. This can be obtained from IHTMLVIEWER_FindElem().
pchBuf
[]:
Pointer to the start of a buffer to hold the result (which is a zero-terminated string).
cbBuf
[]:
Size of the buffer, in bytes.
Interface
  • IHTMLVIEWER
Prototype
  • int32 IHTMLVIEWER_GetElemText(
       IHtmlViewer *  pIHTMLViewer,
       int32          nElemPos,
       char *         pchBuf,
       int32          cbBuf
    );
    
Return
  • IHTMLVIEWER_BADELEMENT: If failure. This occurs only when the nElemPos value is invalid.
    Length of the resulting string: If successful.
    0(zero): If an empty element, or an element that contains no text is present.
    A value larger than cbBuf: May be returned, but only cbBuf bytes are written to the buffer in that case.
Side Effect
  • None
Comments
None