Allows to perform a copy for the content provided, doing an xml character escaping for non allowed values (&, <, >, ' and "). This function must be used with axl_node_has_invalid_chars to check if the content has escapable chars an to get the additional content that must be allocated by this function. Here is an example: char * content = "Some content with invalid chars & < >"; int additional_size; char * new_content if (axl_node_has_invalid_chars (content, strlen (content), &additional_size)) { // found that the string has invalid chars, escape them new_content = axl_node_content_copy_and_escape (content, strlen (content), additional_size); }
|