axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_node_has_invalid_chars_cdata ( const char *  content,
int  content_size,
int *  added_size 

Allows to check if the provided string have escape sequences that must be defined by using the entity reference rather the value itself, taking into consideration the content will be used for a <![CDATA[..]]> section.

This function is useful in the sense it allows to know if a particular content will contain elements not allowed by the XML 1.0 definition to be placed directly (like &, <, ;, ' and ").

This function use usually complemented with axl_node_content_copy_and_escape_cdata.

contentThe content to check.
content_sizeThe size of the content to be checked. If -1 is provided, the function will calculate the content length.
added_sizeAn integer reference where the additional size variable will be added. This additional size will be the space required to replace non-valid characters with entity references. This parameter is optional, so passing a NULL value is allowed.
axl_true if the string contains non valid sequences that must be escaped using entity references.

References axl_true.

Referenced by axl_node_set_cdata_content().