xml_is_well_formed_document()

检查XML文档是否格式良好的函数

xml_is_well_formed_document() 是一个系统函数,用于检查提供的XML文本值是否代表一个格式良好的文档。

xml_is_well_formed_document() 函数在 PostgreSQL 9.1 中添加。

用法

xml_is_well_formed_document ( text ) → boolean

xml_is_well_formed_document() 函数等同于将 xmloption 设置为 document 时的 xml_is_well_formed() 函数。

变更历史

示例

xml_is_well_formed_document() 的基本用法示例

postgres=# SELECT xml_is_well_formed_document('foobar');
 xml_is_well_formed 
--------------------
 f
(1 row)

postgres=# SELECT xml_is_well_formed_document('<baz>foobar</baz>');
 xml_is_well_formed 
--------------------
 t
(1 row)

分类

系统函数, XML

另请参阅

xml_is_well_formed_content(), xml_is_well_formed()

反馈

提交关于“xml_is_well_formed_document()”的任何评论、建议或更正,请点击 这里