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() 函数。
变更历史
- PostgreSQL 9.1
- 添加(提交 a0b7b717)
示例
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)
参考资料
- PostgreSQL 文档: xml_is_well_formed_document()
