# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
#
XML_NO_INDENTATION = -1
# Represents XML node type.
#
#
#
# @wxrb_require USE_XML
class XmlNodeType < Wx::Enum
#
#
XML_ELEMENT_NODE = Wx::XmlNodeType.new(1)
#
#
XML_ATTRIBUTE_NODE = Wx::XmlNodeType.new(2)
#
#
XML_TEXT_NODE = Wx::XmlNodeType.new(3)
#
#
XML_CDATA_SECTION_NODE = Wx::XmlNodeType.new(4)
#
#
XML_ENTITY_REF_NODE = Wx::XmlNodeType.new(5)
#
#
XML_ENTITY_NODE = Wx::XmlNodeType.new(6)
#
#
XML_PI_NODE = Wx::XmlNodeType.new(7)
#
#
XML_COMMENT_NODE = Wx::XmlNodeType.new(8)
#
#
XML_DOCUMENT_NODE = Wx::XmlNodeType.new(9)
#
#
XML_DOCUMENT_TYPE_NODE = Wx::XmlNodeType.new(10)
#
#
XML_DOCUMENT_FRAG_NODE = Wx::XmlNodeType.new(11)
#
#
XML_NOTATION_NODE = Wx::XmlNodeType.new(12)
#
#
XML_HTML_DOCUMENT_NODE = Wx::XmlNodeType.new(13)
end # XmlNodeType
#
#
#
#
# @wxrb_require USE_XML
class XmlDocumentLoadFlag < Wx::Enum
#
#
XMLDOC_NONE = Wx::XmlDocumentLoadFlag.new(0)
#
#
XMLDOC_KEEP_WHITESPACE_NODES = Wx::XmlDocumentLoadFlag.new(1)
end # XmlDocumentLoadFlag
# Represents a node in an XML document.
#
# See {Wx::XmlDocument}.
# Each node is named and depending on the node type it may also hold content or be given attributes.
# The two most common node types are {Wx::XmlNodeType::XML_ELEMENT_NODE} and {Wx::XmlNodeType::XML_TEXT_NODE}. {Wx::XmlNodeType::XML_ELEMENT_NODE} represents a pair of XML element tags, whilst {Wx::XmlNodeType::XML_TEXT_NODE} represents the text value that can belong to the element.
# A {Wx::XmlNodeType::XML_ELEMENT_NODE} has a title, and optionally attributes, but does not have any content. A {Wx::XmlNodeType::XML_TEXT_NODE} does not have a title or attributes but should normally have content.
# For example: in the XML fragment
there is an element node with the name title and a single text node child with the text hi as content.
# A {Wx::XmlNodeType::XML_PI_NODE} represents a Processing Instruction (PI) node with the name parameter set as the target and the contents parameter set as the instructions. Note that whilst the PI instructions are often in the form of pseudo-attributes, these do not use the node's attribute member. It is the user's responsibility to code and decode the PI instruction text.
# The {Wx::XmlNodeType::XML_DOCUMENT_TYPE_NODE} is not implemented at this time. Instead, you should get and set the DOCTYPE values using the {Wx::XmlDocument} class.
# If {Wx::Setup::USE_UNICODE} is 0, all strings are encoded in the encoding given to Wx::XmlDocument::Load (default is UTF-8).
#
#
Once a {Wx::XmlNode} has been added to a {Wx::XmlDocument} it becomes owned by the document and this has two implications. Firstly, the {Wx::XmlDocument} takes responsibility for deleting the node so the user should not delete it; and secondly, a {Wx::XmlNode} must always be created on the heap and never on the stack. #
#Note that this function works in O(n) time where n is the number of existing children. Consequently, adding large number of child nodes using this method can be expensive, because it has O(n^2) time complexity in number of nodes to be added. Use {Wx::XmlNode#insert_child_after} to populate XML tree in linear time. #
#-1
if it is unknown.
# @return [Integer]
def get_line_number; end
alias_method :line_number, :get_line_number
# Returns the name of this node.
#
# Can be an empty string (e.g. for nodes of type {Wx::XmlNodeType::XML_TEXT_NODE} or {Wx::XmlNodeType::XML_CDATA_SECTION_NODE}).
# @return [Wx::String]
def get_name; end
alias_method :name, :get_name
# Returns a pointer to the sibling of this node or NULL if there are no siblings.
# @return [Wx::XmlNode]
def get_next; end
alias_method :next_, :get_next
# Returns the content of the first child node of type {Wx::XmlNodeType::XML_TEXT_NODE} or {Wx::XmlNodeType::XML_CDATA_SECTION_NODE}.
#
# This function is very useful since the XML snippet "tagcontent "
is represented by expat with the following tag tree:
#
# ```
# wxXML_ELEMENT_NODE name="tagname", content=""
# |-- wxXML_TEXT_NODE name="", content="tagcontent"
# ```
#
# or eventually:
#
# ```
# wxXML_ELEMENT_NODE name="tagname", content=""
# |-- wxXML_CDATA_SECTION_NODE name="", content="tagcontent"
# ```
#
# An empty string is returned if the node has no children of type {Wx::XmlNodeType::XML_TEXT_NODE} or {Wx::XmlNodeType::XML_CDATA_SECTION_NODE}, or if the content of the first child of such types is empty.
# @return [String]
def get_node_content; end
alias_method :node_content, :get_node_content
# Returns a pointer to the parent of this node or NULL if this node has no parent.
# @return [Wx::XmlNode]
def get_parent; end
alias_method :parent, :get_parent
# Returns the type of this node.
# @return [Wx::XmlNodeType]
def get_type; end
alias_method :type, :get_type
# Returns true if this node has a attribute named attrName.
# @param attrName [String]
# @return [Boolean]
def has_attribute(attrName) end
alias_method :has_attribute?, :has_attribute
# Inserts the child node immediately before followingNode in the children list.
#
# Once inserted, the XML tree takes ownership of the new child and there is no need to delete it.
# true if followingNode has been found and the child node has been inserted.
#
# For historical reasons, followingNode may be NULL. In that case, then child is prepended to the list of children and becomes the first child of this node, i.e. it behaves identically to using the first children (as returned by {Wx::XmlNode#get_children}) for followingNode). #
#