ValidateElements method

Validates the content between two specified markup pointer in a markup container.

Syntax


HRESULT retVal = object.ValidateElements(pPointerStart, pPointerFinish, pPointerTarget, pPointerStatus, ppElemFailBottom, ppElemFailTop);

Parameters

pPointerStart [in]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that specifies the start point of the markup to validate.

pPointerFinish [in]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that specifies the end point of the markup to validate.

pPointerTarget [in, optional]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that provides a context for validating the markup between pPointerStart and pPointerFinish. Set to NULL if unused.

pPointerStatus [in, out]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that receives the point of failure should the markup be invalid, and specifies, if this method is called iteratively on the same markup, the point to continue parsing the markup for additional errors.

ppElemFailBottom [out]

Type: IHTMLElement

Address of a pointer to a variable that receives an IHTMLElement interface pointer for the element in the markup that caused the failure at pPointerStatus, should the markup be invalid.

ppElemFailTop [out]

Type: IHTMLElement

Address of a pointer to a variable that receives an IHTMLElement interface pointer for the element in the markup that conflicts with ppElemFailTop, should the markup be invalid.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

To collect all the errors in the markup, you can call this method repeatedly by passing in the same markup pointer, pPointerStatus, each time.

If pPointerTarget is not supplied, the markup between pPointerStart and pPointerFinish will be validated as is. If it is supplied, the markup will be validated as if it were a part of pPointerTarget's markup container, inserted at the point pPointerTarget. This method returns an error if pPointerTarget is not in a different markup container than pPointerStart and pPointerFinish.

 

 

Show: