{"Entry":{"collection":"func","key":"xmlelement","name":"xmlelement","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.3"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"a20e4f0580c0c8d263fba855a3ea026034106b9aad4707f39f7da05a3ec68ad9","derived_content_hash":"c9e556ef38b406d991e6762fa846dcd4023d967d6012caccd4bdcbd5394d6c84","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:86c592b82a8228adfe23c67c1293069b918fe532bab00dae20dcbe3601bc1661","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"8.3","group":"xml","group_label":"Xml Functions","groups":["xml"],"imported_at":"2026-09-27T17:57:28.799408+08:00","last_version":"20","name":"xmlelement","name_key":"xmlelement","position":15020,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"f34deed895faccc4eb56577e416186ab91a61f509bdc9758e54299dc37429659","repair":"wiki-repair-20261023"},"signature":"xmlelement ( NAME name [, XMLATTRIBUTES ( attvalue [AS attname] [, ...] ) ] [, content [, ...]] ) → xml","signature_count":1,"slug":"xmlelement","source_rev":"wiki-repair-20261023:86c592b82a8228adfe23c67c1293069b918fe532bab00dae20dcbe3601bc1661","summary":"The xmlelement expression produces an XML element with the given name, attributes, and content.","summary_zh":""}},"Definition":{"Collection":"func","Key":"xmlelement","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"xmlelement","SourceRevision":"wiki-repair-20261023:86c592b82a8228adfe23c67c1293069b918fe532bab00dae20dcbe3601bc1661","Facts":{"description":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","description_html":"The \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","description_zh":"表达式 xmlelement 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 name 和 attname 项是简单的标识符，而不是值。attvalue 和 content 项是表达式，它们可以产生任意 PostgreSQL 数据类型的值。XMLATTRIBUTES 的参数生成 XML 元素的属性；将 content 值连接起来形成其内容。","description_zh_html":"表达式 \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e 项是简单的标识符，而不是值。\u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 项是表达式，它们可以产生任意 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 数据类型的值。\u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e 的参数生成 XML 元素的属性；将 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 值连接起来形成其内容。","doc":{"anchor":"FUNCTIONS-PRODUCING-XML-XMLELEMENT","file":"functions-xml.html","sha256":"01aeb9b85a44b934664d02e73f09eba80ac8da243706dd1ea2b4943d6cf43a31","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-xml.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"01aeb9b85a44b934664d02e73f09eba80ac8da243706dd1ea2b4943d6cf43a31","version":"18.7"},{"file":"functions-xml.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"7f81f95d894b56436ba5c9f248999c6f79a15eff2f8e02803e9578894005ba44","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"xml","group_label":"XML 函数","lang":"en","layout":"table-new","pages":["functions-xml.html"],"prose_only":false,"signatures":[{"description":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","description_html":"The \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","description_zh":"表达式 xmlelement 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 name 和 attname 项是简单的标识符，而不是值。attvalue 和 content 项是表达式，它们可以产生任意 PostgreSQL 数据类型的值。XMLATTRIBUTES 的参数生成 XML 元素的属性；将 content 值连接起来形成其内容。","description_zh_html":"表达式 \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e 项是简单的标识符，而不是值。\u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 项是表达式，它们可以产生任意 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 数据类型的值。\u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e 的参数生成 XML 元素的属性；将 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 值连接起来形成其内容。","examples":[],"html":"\u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eNAME\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eAS\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e] ) \u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e]\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003exml\u003c/code\u003e","returns":"xml","text":"xmlelement ( NAME name [, XMLATTRIBUTES ( attvalue [AS attname] [, ...] ) ] [, content [, ...]] ) → xml","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-xml.html","sha256":"fecb5d8486a96d59e4b5808eeaa769d216ab3be80602eb0c73702f28dd37388c"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-PRODUCING-XML-XMLELEMENT","file":"functions-xml.html","sha256":"01aeb9b85a44b934664d02e73f09eba80ac8da243706dd1ea2b4943d6cf43a31","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"xmlelement","SourceDatabase":"center","Version":"18","Locale":"en","Title":"xmlelement","Summary":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","BodyHTML":"The \u003ccode\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","SourceRevision":"wiki-repair-20261023:86c592b82a8228adfe23c67c1293069b918fe532bab00dae20dcbe3601bc1661","ContentHash":"68637e76c112fcdf7159d3b4d7aabcbd9dde67727e9696fc05a32211e653ce12","Payload":{"description":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","description_html":"The \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","signatures":[{"description":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","description_html":"The \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","description_zh":"表达式 xmlelement 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 name 和 attname 项是简单的标识符，而不是值。attvalue 和 content 项是表达式，它们可以产生任意 PostgreSQL 数据类型的值。XMLATTRIBUTES 的参数生成 XML 元素的属性；将 content 值连接起来形成其内容。","description_zh_html":"表达式 \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e 项是简单的标识符，而不是值。\u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 项是表达式，它们可以产生任意 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 数据类型的值。\u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e 的参数生成 XML 元素的属性；将 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 值连接起来形成其内容。","examples":[],"html":"\u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eNAME\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eAS\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e] ) \u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e]\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003exml\u003c/code\u003e","returns":"xml","text":"xmlelement ( NAME name [, XMLATTRIBUTES ( attvalue [AS attname] [, ...] ) ] [, content [, ...]] ) → xml","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"d5921fb5fa9b55045eac3a2be81c611cc121739830f64abac1ecf203ef840bd2","Text":"xmlelement ( NAME name [, XMLATTRIBUTES ( attvalue [AS attname] [, ...] ) ] [, content [, ...]] ) → xml","Returns":"xml","Payload":{"description":"The xmlelement expression produces an XML element with the given name, attributes, and content. The name and attname items shown in the syntax are simple identifiers, not values. The attvalue and content items are expressions, which can yield any PostgreSQL data type. The argument(s) within XMLATTRIBUTES generate attributes of the XML element; the content value(s) are concatenated to form its content.","description_html":"The \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e expression produces an XML element with the given name, attributes, and content. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e items shown in the syntax are simple identifiers, not values. The \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e items are expressions, which can yield any \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e data type. The argument(s) within \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e generate attributes of the XML element; the \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e value(s) are concatenated to form its content.","description_zh":"表达式 xmlelement 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 name 和 attname 项是简单的标识符，而不是值。attvalue 和 content 项是表达式，它们可以产生任意 PostgreSQL 数据类型的值。XMLATTRIBUTES 的参数生成 XML 元素的属性；将 content 值连接起来形成其内容。","description_zh_html":"表达式 \u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e 使用给定名称、属性和内容产生一个 XML 元素。语法中显示的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e 项是简单的标识符，而不是值。\u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 项是表达式，它们可以产生任意 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 数据类型的值。\u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e 的参数生成 XML 元素的属性；将 \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e 值连接起来形成其内容。","examples":[],"html":"\u003ccode class=\"function\"\u003exmlelement\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eNAME\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"literal\"\u003eXMLATTRIBUTES\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattvalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e\u003ccode class=\"literal\"\u003eAS\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eattname\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e] ) \u003c/span\u003e] [\u003cspan class=\"optional\"\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e]\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003exml\u003c/code\u003e","returns":"xml","text":"xmlelement ( NAME name [, XMLATTRIBUTES ( attvalue [AS attname] [, ...] ) ] [, content [, ...]] ) → xml","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
