Top | ![]() |
![]() |
![]() |
![]() |
gboolean cong_node_is_element (CongNodePtr node
,const gchar *ns_uri
,const gchar *local_name
);
Handy method for deciding if you've found a element with the given name, as opposed to text nodes, comments, elements with other names etc.
gboolean cong_node_is_element_from_set (CongNodePtr node
,const gchar *ns_uri
,const gchar **local_name_array
,guint num_local_names
,guint *output_index
);
Handy method for deciding if you've found a element with one of the given names in the set, as opposed to text nodes, comments, elements with other names etc.
const gchar *
cong_node_get_local_name (CongNodePtr node
);
TODO: Write me
gchar *
cong_node_get_qualified_name (CongNodePtr node
);
Builds a string of the form "ns_prefix:local_name" for an element inside a namespace or simply "local_name" for the rest.
xmlNsPtr cong_node_get_ns_for_uri (CongNodePtr node
,const gchar *ns_uri
);
xmlNsPtr cong_node_get_ns_for_prefix (CongNodePtr node
,const gchar *prefix
);
xmlNsPtr cong_node_get_attr_ns (CongNodePtr node
,const char *qualified_name
,const char **output_name
);
gchar *
cong_node_get_path (CongNodePtr node
);
Method for getting an XPath to the node.
gchar *
cong_node_debug_description (CongNodePtr node
);
TODO: Write me
const gchar *
cong_node_type_description (CongNodeType node_type
);
TODO: Write me
gchar * cong_node_get_attribute (CongNodePtr node
,xmlNsPtr ns_ptr
,const gchar *local_attribute_name
);
Returns the content of the attribute specified through local_attribute_name
and
ns_ptr
.
gboolean cong_node_has_attribute (CongNodePtr node
,xmlNsPtr ns_ptr
,const gchar *local_attribute_name
);
void
cong_node_self_test_recursive (CongNodePtr node
);
TODO: Write me
void cong_node_recursive_set_doc (CongNodePtr node
,xmlDocPtr xml_doc
);
TODO: Write me
gboolean cong_node_is_descendant_of (CongNodePtr node
,CongNodePtr potential_ancestor
);
TODO: Write me
CongNodePtr cong_node_new_element (xmlNsPtr ns
,const gchar *tagname
,CongDocument *doc
);
TODO: Write me
CongNodePtr cong_node_new_element_from_dispspec (CongDispspecElement *element
,CongDocument *doc
);
TODO: Write me
CongNodePtr cong_node_new_text (const gchar *text
,CongDocument *doc
);
TODO: Write me
CongNodePtr cong_node_new_text_len (const gchar *text
,int len
,CongDocument *doc
);
TODO: Write me
CongNodePtr cong_node_new_comment (const gchar *comment
,CongDocument *doc
);
gchar *
cong_node_generate_source (CongNodePtr node
);
Generate XML source for the node
gchar *
cong_node_generate_child_source (CongNodePtr node
);
Generate XML source for the node's children, concatenated together as a UTF8 string. Should handle entity references correctly. The result does not include the XML source for the node itself.
gchar * cong_node_generate_source_from_byte_offset (CongNodePtr node
,int byte_offset
);
TODO: Write me
gchar * cong_node_generate_source_up_to_byte_offset (CongNodePtr node
,int byte_offset
);
TODO: Write me
gchar * cong_node_generate_source_between_byte_offsets (CongNodePtr node
,int start_byte_offset
,int end_byte_offset
);
TODO: Write me
void
cong_node_private_make_orphan (CongNodePtr node
);
TODO: Write me
void cong_node_private_add_after (CongNodePtr node
,CongNodePtr older_sibling
);
TODO: Write me
void cong_node_private_add_before (CongNodePtr node
,CongNodePtr younger_sibling
);
TODO: Write me
void cong_node_private_set_parent (CongNodePtr node
,CongNodePtr adoptive_parent
,gboolean add_to_end
);
TODO: Write me
void cong_node_private_set_text (CongNodePtr node
,const gchar *new_content
);
TODO: Write me
void cong_node_private_set_attribute (CongNodePtr node
,xmlNs *ns_ptr
,const gchar *local_attribute_name
,const gchar *value
);
TODO: Write me
void cong_node_private_remove_attribute (CongNodePtr node
,xmlNs *ns_ptr
,const gchar *local_attribute_name
);
TODO: Write me
CongNodePtr cong_node_get_child_by_name (CongNodePtr node
,const gchar *ns_uri
,const gchar *local_name
);
This function searches the children of node
looking for elements of the given name.
CongNodePtr
cong_node_get_first_text_node_descendant
(CongNodePtr node
);
TODO: Write me
gboolean
cong_node_should_be_visible_in_editor (CongNodePtr node
);
The function determines if the node ought to be visible in the main editor view.
As described in bug 123367, TEXT nodes that are either empty or purely whitespace should only appear in the main editor view if the DTD allows PCDATA at the location in the document. Otherwise the text is probably merely formatting to prettify the source view. *
gboolean
cong_node_is_valid_cursor_location (CongNodePtr node
);
The function detemines if the node is a suitable location for the cursor.
It currently only tests for TEXT nodes, but will eventually be expanded to allow COMMENT nodes as well.
gboolean
cong_node_supports_byte_offsets (CongNodePtr node
);
The function determines if CongLocation objects that reference this node can have meaningful byte offsets
Only TEXT, COMMENT and CDATA_SECTION nodes can currently have meaningful byte offsets.
a gboolean which is TRUE if CongLocations that reference this node can have a meaningful byte offset
int cong_node_get_ordering (CongNodePtr n0
,CongNodePtr n1
);
This functions compares the location of two nodes in the xml tree and returns a numeric comparsion representing their locations in a depth-first traversal.
CongNodePtr cong_node_calc_first_node_in_subtree_satisfying (CongNodePtr node
,CongNodePredicate predicate
,gpointer user_data
);
Finds the first node in a depth-first traversal of the subtree below this node that satisfies the predicate.
Note that node
is the initial node of the tree (and hence is tested first)
CongNodePtr cong_node_calc_final_node_in_subtree_satisfying (CongNodePtr node
,CongNodePredicate predicate
,gpointer user_data
);
Finds the final node in a depth-first traversal of the subtree below this node that satisfies the predicate.
Note that node
is the initial node of the tree (and hence is tested last)
CongNodePtr cong_node_calc_prev_node_satisfying (CongNodePtr node
,CongNodePredicate predicate
,gpointer user_data
);
Finds the first preceding node relative to the input that satisfies the predicate, in an imagined depth-first traversal of the document. Includes ancestors.
CongNodePtr cong_node_calc_next_node_satisfying (CongNodePtr node
,CongNodePredicate predicate
,gpointer user_data
);
Finds the first following node relative to the input that satisfies the predicate, in an imagined depth-first traversal of the document. Includes ancestors.