Browse Source

Merge pull request #89141 from timothyqiu/xml-node-name

Fix documentation of `XMLParser::get_node_name()`
Rémi Verschelde 1 year ago
parent
commit
b6382a573f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      doc/classes/XMLParser.xml

+ 2 - 1
doc/classes/XMLParser.xml

@@ -91,7 +91,8 @@
 		<method name="get_node_name" qualifiers="const">
 			<return type="String" />
 			<description>
-				Returns the name of an element node. This method will raise an error if the currently parsed node is not of [constant NODE_ELEMENT] or [constant NODE_ELEMENT_END] type.
+				Returns the name of a node. This method will raise an error if the currently parsed node is a text node.
+				[b]Note:[/b] The content of a [constant NODE_CDATA] node and the comment string of a [constant NODE_COMMENT] node are also considered names.
 			</description>
 		</method>
 		<method name="get_node_offset" qualifiers="const">