Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetParseErrors – PB Docs 126 – PowerBuilder Library

GetParseErrors – PB Docs 126

PBDOM_BUILDER:

GetParseErrors method

Description

Obtains
a list of parsing errors detected during document parsing.

Syntax

Argument

Description

pbdom_builder_name

The name of a PBDOM_BUILDER
object

strErrorMessageArray

An unbounded array of strings, each of
which will be filled with a formatted string containing a parse
error.

Return Values

Boolean. Returns true if
a list of parse errors has been retrieved and false otherwise. Also
returns false if there are no parse errors.

Throws

EXCEPTION_INVALID_ARGUMENT – The
input string array is invalid. This can happen if it has not been
initialised properly or is a null object reference.

EXCEPTION_MEMORY_ALLOCATION_FAILURE – Insufficient
memory was encountered while executing this method.

Examples

The code in this example attempts to create a PBDOM_DOCUMENT
based on the following XML:

This XML is well formed but is not valid, because the element root contains two
child elements abc and def that
are not declared in the DOCTYPE. When GetParseErrors is called,
it returns the value true, indicating that at least one parse error
has occurred, and generates the following list of errors:

The 1 in both error messages indicates that the error occurred
in line 1 of the XML string, and the 103 and 109 indicate columns
103 and 109, respectively.

Usage

This method retrieves a list of errors detected during the
last parse operation performed by this PBDOM_BUILDER. Each
string in the array has the following format:

where Line Number and Column
Number
indicate the line number and column number in
the XML document where the error was encountered. Error Message is
the parse error message.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x