IsValidXML() function
The IsValidXML() function determines whether a character string can be parsed as XML.
Syntax
The IsValidXML() function has the following
syntax:
boolean = IsValidXML(varchar input);
The input value specifies the character string to
analyze.
Returns
The function returns t (true) if the character string input can be parsed as XML; otherwise, the function returns f (false).
Examples
select IsValidXML('<tag1>12</tag1>');
ISVALIDXML
------------
t
(1 row)
select ISValidXML('<tag1><tag2>');
ISVALIDXML
------------
f
(1 row)