{"Entry":{"collection":"func","key":"xml-is-well-formed-document","name":"xml_is_well_formed_document","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"e577b63f9901400c40df2f1ae6b9fec7352bc0b4cf447a8da1a3180018a6e3a4","first_version":"9.1","group":"xml","group_label":"Xml Functions","groups":["xml"],"imported_at":"2026-09-14T21:49:48.767106+08:00","last_version":"20","name":"xml_is_well_formed_document","name_key":"xml_is_well_formed_document","position":15016,"present_in":["9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"xml_is_well_formed_document ( text ) → boolean","signature_count":1,"slug":"xml-is-well-formed-document","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"These functions check whether a text string represents well-formed XML, returning a Boolean result.","summary_zh":""}},"Definition":{"Collection":"func","Key":"xml-is-well-formed-document","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"xml-is-well-formed-document","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"These functions check whether a text string represents well-formed XML, returning a Boolean result. xml_is_well_formed_document checks for a well-formed document, while xml_is_well_formed_content checks for well-formed content. xml_is_well_formed does the former if the xmloption configuration parameter is set to DOCUMENT, or the latter if it is set to CONTENT. This means that xml_is_well_formed is useful for seeing whether a simple cast to type xml will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of XMLPARSE will succeed.","description_html":"These functions check whether a \u003ccode class=\"type\"\u003etext\u003c/code\u003e string represents well-formed XML, returning a Boolean result. \u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e checks for a well-formed document, while \u003ccode class=\"function\"\u003exml_is_well_formed_content\u003c/code\u003e checks for well-formed content. \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e does the former if the \u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\"\u003exmloption\u003c/a\u003e configuration parameter is set to \u003ccode class=\"literal\"\u003eDOCUMENT\u003c/code\u003e, or the latter if it is set to \u003ccode class=\"literal\"\u003eCONTENT\u003c/code\u003e. This means that \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e is useful for seeing whether a simple cast to type \u003ccode class=\"type\"\u003exml\u003c/code\u003e will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of \u003ccode class=\"function\"\u003eXMLPARSE\u003c/code\u003e will succeed.","description_zh":"","description_zh_html":"","doc":{"anchor":"XML-IS-WELL-FORMED","file":"functions-xml.html","slug":"18"},"group":"xml","group_label":"Xml Functions","lang":"en","layout":"table-new","pages":["functions-xml.html"],"prose_only":false,"signatures":[{"description":"These functions check whether a text string represents well-formed XML, returning a Boolean result. xml_is_well_formed_document checks for a well-formed document, while xml_is_well_formed_content checks for well-formed content. xml_is_well_formed does the former if the xmloption configuration parameter is set to DOCUMENT, or the latter if it is set to CONTENT. This means that xml_is_well_formed is useful for seeing whether a simple cast to type xml will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of XMLPARSE will succeed.","description_html":"These functions check whether a \u003ccode class=\"type\"\u003etext\u003c/code\u003e string represents well-formed XML, returning a Boolean result. \u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e checks for a well-formed document, while \u003ccode class=\"function\"\u003exml_is_well_formed_content\u003c/code\u003e checks for well-formed content. \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e does the former if the \u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\"\u003exmloption\u003c/a\u003e configuration parameter is set to \u003ccode class=\"literal\"\u003eDOCUMENT\u003c/code\u003e, or the latter if it is set to \u003ccode class=\"literal\"\u003eCONTENT\u003c/code\u003e. This means that \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e is useful for seeing whether a simple cast to type \u003ccode class=\"type\"\u003exml\u003c/code\u003e will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of \u003ccode class=\"function\"\u003eXMLPARSE\u003c/code\u003e will succeed.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eboolean\u003c/code\u003e","returns":"boolean","text":"xml_is_well_formed_document ( text ) → boolean","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"XML-IS-WELL-FORMED","file":"functions-xml.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"xml-is-well-formed-document","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"xml_is_well_formed_document","Summary":"这些函数检查一个text串是不是一个良构的 XML，返回一个布尔结果。xml_is_well_formed_document检查一个良构的文档，而xml_is_well_formed_content检查良构的内容。如果xmloption配置参数被设置为DOCUMENT，xml_is_well_formed会做第一个函数的工作；如果配置参数被设置为CONTENT，xml_is_well_formed会做第二个函数的工作。这意味着xml_is_well_formed对于检查一个到类型xml的简单类型转换是否会成功非常有用，而其他两个函数对于检查XMLPARSE的对应变体是否会成功有用。","BodyHTML":"这些函数检查一个\u003ccode\u003etext\u003c/code\u003e串是不是一个良构的 XML，返回一个布尔结果。\u003ccode\u003exml_is_well_formed_document\u003c/code\u003e检查一个良构的文档，而\u003ccode\u003exml_is_well_formed_content\u003c/code\u003e检查良构的内容。如果\u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\" rel=\"nofollow\"\u003exmloption\u003c/a\u003e配置参数被设置为\u003ccode\u003eDOCUMENT\u003c/code\u003e，\u003ccode\u003exml_is_well_formed\u003c/code\u003e会做第一个函数的工作；如果配置参数被设置为\u003ccode\u003eCONTENT\u003c/code\u003e，\u003ccode\u003exml_is_well_formed\u003c/code\u003e会做第二个函数的工作。这意味着\u003ccode\u003exml_is_well_formed\u003c/code\u003e对于检查一个到类型\u003ccode\u003exml\u003c/code\u003e的简单类型转换是否会成功非常有用，而其他两个函数对于检查\u003ccode\u003eXMLPARSE\u003c/code\u003e的对应变体是否会成功有用。\u003cpre\u003exml_is_well_formed_document ( text ) → boolean\u003c/pre\u003e这些函数检查一个\u003ccode\u003etext\u003c/code\u003e串是不是一个良构的 XML，返回一个布尔结果。\u003ccode\u003exml_is_well_formed_document\u003c/code\u003e检查一个良构的文档，而\u003ccode\u003exml_is_well_formed_content\u003c/code\u003e检查良构的内容。如果\u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\" rel=\"nofollow\"\u003exmloption\u003c/a\u003e配置参数被设置为\u003ccode\u003eDOCUMENT\u003c/code\u003e，\u003ccode\u003exml_is_well_formed\u003c/code\u003e会做第一个函数的工作；如果配置参数被设置为\u003ccode\u003eCONTENT\u003c/code\u003e，\u003ccode\u003exml_is_well_formed\u003c/code\u003e会做第二个函数的工作。这意味着\u003ccode\u003exml_is_well_formed\u003c/code\u003e对于检查一个到类型\u003ccode\u003exml\u003c/code\u003e的简单类型转换是否会成功非常有用，而其他两个函数对于检查\u003ccode\u003eXMLPARSE\u003c/code\u003e的对应变体是否会成功有用。","SourceRevision":"ca936764","ContentHash":"891beecb815395443d69a9cf348fd8e0ff04b2df5207e67616cd31618eed2392","Payload":{"description_zh":"这些函数检查一个text串是不是一个良构的 XML，返回一个布尔结果。xml_is_well_formed_document检查一个良构的文档，而xml_is_well_formed_content检查良构的内容。如果xmloption配置参数被设置为DOCUMENT，xml_is_well_formed会做第一个函数的工作；如果配置参数被设置为CONTENT，xml_is_well_formed会做第二个函数的工作。这意味着xml_is_well_formed对于检查一个到类型xml的简单类型转换是否会成功非常有用，而其他两个函数对于检查XMLPARSE的对应变体是否会成功有用。","description_zh_html":"这些函数检查一个\u003ccode class=\"type\"\u003etext\u003c/code\u003e串是不是一个良构的 XML，返回一个布尔结果。\u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e检查一个良构的文档，而\u003ccode class=\"function\"\u003exml_is_well_formed_content\u003c/code\u003e检查良构的内容。如果\u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\"\u003exmloption\u003c/a\u003e配置参数被设置为\u003ccode class=\"literal\"\u003eDOCUMENT\u003c/code\u003e，\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e会做第一个函数的工作；如果配置参数被设置为\u003ccode class=\"literal\"\u003eCONTENT\u003c/code\u003e，\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e会做第二个函数的工作。这意味着\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e对于检查一个到类型\u003ccode class=\"type\"\u003exml\u003c/code\u003e的简单类型转换是否会成功非常有用，而其他两个函数对于检查\u003ccode class=\"function\"\u003eXMLPARSE\u003c/code\u003e的对应变体是否会成功有用。","signatures":[{"description_zh":"这些函数检查一个text串是不是一个良构的 XML，返回一个布尔结果。xml_is_well_formed_document检查一个良构的文档，而xml_is_well_formed_content检查良构的内容。如果xmloption配置参数被设置为DOCUMENT，xml_is_well_formed会做第一个函数的工作；如果配置参数被设置为CONTENT，xml_is_well_formed会做第二个函数的工作。这意味着xml_is_well_formed对于检查一个到类型xml的简单类型转换是否会成功非常有用，而其他两个函数对于检查XMLPARSE的对应变体是否会成功有用。","description_zh_html":"这些函数检查一个\u003ccode class=\"type\"\u003etext\u003c/code\u003e串是不是一个良构的 XML，返回一个布尔结果。\u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e检查一个良构的文档，而\u003ccode class=\"function\"\u003exml_is_well_formed_content\u003c/code\u003e检查良构的内容。如果\u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\"\u003exmloption\u003c/a\u003e配置参数被设置为\u003ccode class=\"literal\"\u003eDOCUMENT\u003c/code\u003e，\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e会做第一个函数的工作；如果配置参数被设置为\u003ccode class=\"literal\"\u003eCONTENT\u003c/code\u003e，\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e会做第二个函数的工作。这意味着\u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e对于检查一个到类型\u003ccode class=\"type\"\u003exml\u003c/code\u003e的简单类型转换是否会成功非常有用，而其他两个函数对于检查\u003ccode class=\"function\"\u003eXMLPARSE\u003c/code\u003e的对应变体是否会成功有用。","returns":"boolean","text":"xml_is_well_formed_document ( text ) → boolean","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"4cecc23386dbf5cad3f70411e59d020b71362fa07d674abbaac8a860bb6b0341","Text":"xml_is_well_formed_document ( text ) → boolean","Returns":"boolean","Payload":{"description":"These functions check whether a text string represents well-formed XML, returning a Boolean result. xml_is_well_formed_document checks for a well-formed document, while xml_is_well_formed_content checks for well-formed content. xml_is_well_formed does the former if the xmloption configuration parameter is set to DOCUMENT, or the latter if it is set to CONTENT. This means that xml_is_well_formed is useful for seeing whether a simple cast to type xml will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of XMLPARSE will succeed.","description_html":"These functions check whether a \u003ccode class=\"type\"\u003etext\u003c/code\u003e string represents well-formed XML, returning a Boolean result. \u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e checks for a well-formed document, while \u003ccode class=\"function\"\u003exml_is_well_formed_content\u003c/code\u003e checks for well-formed content. \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e does the former if the \u003ca href=\"/docs/18/runtime-config-client.html#GUC-XMLOPTION\"\u003exmloption\u003c/a\u003e configuration parameter is set to \u003ccode class=\"literal\"\u003eDOCUMENT\u003c/code\u003e, or the latter if it is set to \u003ccode class=\"literal\"\u003eCONTENT\u003c/code\u003e. This means that \u003ccode class=\"function\"\u003exml_is_well_formed\u003c/code\u003e is useful for seeing whether a simple cast to type \u003ccode class=\"type\"\u003exml\u003c/code\u003e will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of \u003ccode class=\"function\"\u003eXMLPARSE\u003c/code\u003e will succeed.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003exml_is_well_formed_document\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eboolean\u003c/code\u003e","returns":"boolean","text":"xml_is_well_formed_document ( text ) → boolean","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
