MagickCore  6.9.12-19
Convert, Edit, Or Compose Bitmap Images
xml-tree.c File Reference
Include dependency graph for xml-tree.c:

Data Structures

struct  _XMLTreeInfo
 
struct  _XMLTreeRoot
 

Macros

#define NumberPredefinedEntities   10
 
#define XMLWhitespace   "\t\r\n "
 

Typedefs

typedef struct _XMLTreeRoot XMLTreeRoot
 

Functions

MagickExport XMLTreeInfoAddChildToXMLTree (XMLTreeInfo *xml_info, const char *tag, const size_t offset)
 
MagickExport XMLTreeInfoAddPathToXMLTree (XMLTreeInfo *xml_info, const char *path, const size_t offset)
 
MagickExport char * CanonicalXMLContent (const char *content, const MagickBooleanType pedantic)
 
static char ** DestroyXMLTreeAttributes (char **attributes)
 
static void DestroyXMLTreeChild (XMLTreeInfo *xml_info)
 
static void DestroyXMLTreeOrdered (XMLTreeInfo *xml_info)
 
static void DestroyXMLTreeRoot (XMLTreeInfo *xml_info)
 
MagickExport XMLTreeInfoDestroyXMLTree (XMLTreeInfo *xml_info)
 
MagickPrivate char * FileToXML (const char *filename, const size_t extent)
 
MagickExport XMLTreeInfoGetNextXMLTreeTag (XMLTreeInfo *xml_info)
 
MagickExport const char * GetXMLTreeAttribute (XMLTreeInfo *xml_info, const char *tag)
 
MagickExport MagickBooleanType GetXMLTreeAttributes (const XMLTreeInfo *xml_info, SplayTreeInfo *attributes)
 
MagickExport XMLTreeInfoGetXMLTreeChild (XMLTreeInfo *xml_info, const char *tag)
 
MagickExport const char * GetXMLTreeContent (XMLTreeInfo *xml_info)
 
MagickExport XMLTreeInfoGetXMLTreeOrdered (XMLTreeInfo *xml_info)
 
MagickExport XMLTreeInfoGetXMLTreePath (XMLTreeInfo *xml_info, const char *path)
 
MagickExport const char ** GetXMLTreeProcessingInstructions (XMLTreeInfo *xml_info, const char *target)
 
MagickExport XMLTreeInfoGetXMLTreeSibling (XMLTreeInfo *xml_info)
 
MagickExport const char * GetXMLTreeTag (XMLTreeInfo *xml_info)
 
MagickExport XMLTreeInfoInsertTagIntoXMLTree (XMLTreeInfo *xml_info, XMLTreeInfo *child, const size_t offset)
 
static char * ConvertUTF16ToUTF8 (const char *content, size_t *length)
 
static char * ParseEntities (char *xml, char **entities, int state)
 
static void ParseCharacterContent (XMLTreeRoot *root, char *xml, const size_t length, const char state)
 
static XMLTreeInfoParseCloseTag (XMLTreeRoot *root, char *tag, ExceptionInfo *exception)
 
static MagickBooleanType ValidateEntities (char *tag, char *xml, const size_t depth, char **entities)
 
static void ParseProcessingInstructions (XMLTreeRoot *root, char *xml, size_t length)
 
static MagickBooleanType ParseInternalDoctype (XMLTreeRoot *root, char *xml, size_t length, ExceptionInfo *exception)
 
static void ParseOpenTag (XMLTreeRoot *root, char *tag, char **attributes)
 
static MagickBooleanType IsSkipTag (const char *tag)
 
MagickExport XMLTreeInfoNewXMLTree (const char *xml, ExceptionInfo *exception)
 
MagickExport XMLTreeInfoNewXMLTreeTag (const char *tag)
 
MagickExport XMLTreeInfoPruneTagFromXMLTree (XMLTreeInfo *xml_info)
 
MagickExport XMLTreeInfoSetXMLTreeAttribute (XMLTreeInfo *xml_info, const char *tag, const char *value)
 
MagickExport XMLTreeInfoSetXMLTreeContent (XMLTreeInfo *xml_info, const char *content)
 
static char * EncodePredefinedEntities (const char *source, ssize_t offset, char **destination, size_t *length, size_t *extent, MagickBooleanType pedantic)
 
static char * XMLTreeTagToXML (XMLTreeInfo *xml_info, char **source, size_t *length, size_t *extent, size_t start, char ***attributes)
 
MagickExport char * XMLTreeInfoToXML (XMLTreeInfo *xml_info)
 

Variables

static char * sentinel [] = { (char *) NULL }
 
static const char * skip_tags [3]
 

Macro Definition Documentation

#define NumberPredefinedEntities   10
#define XMLWhitespace   "\t\r\n "

Typedef Documentation

typedef struct _XMLTreeRoot XMLTreeRoot

Function Documentation

static char* ConvertUTF16ToUTF8 ( const char *  content,
size_t *  length 
)
static
static char** DestroyXMLTreeAttributes ( char **  attributes)
static
static void DestroyXMLTreeChild ( XMLTreeInfo xml_info)
static

References _XMLTreeInfo::child, and DestroyXMLTree().

Referenced by DestroyXMLTree().

static void DestroyXMLTreeOrdered ( XMLTreeInfo xml_info)
static

References DestroyXMLTree(), and _XMLTreeInfo::ordered.

Referenced by DestroyXMLTree().

static char* EncodePredefinedEntities ( const char *  source,
ssize_t  offset,
char **  destination,
size_t *  length,
size_t *  extent,
MagickBooleanType  pedantic 
)
static
static MagickBooleanType IsSkipTag ( const char *  tag)
inlinestatic

References LocaleCompare(), MagickFalse, MagickTrue, and skip_tags.

Referenced by NewXMLTree().

static void ParseCharacterContent ( XMLTreeRoot root,
char *  xml,
const size_t  length,
const char  state 
)
static
static XMLTreeInfo* ParseCloseTag ( XMLTreeRoot root,
char *  tag,
ExceptionInfo exception 
)
static
static char* ParseEntities ( char *  xml,
char **  entities,
int  state 
)
static
static void ParseOpenTag ( XMLTreeRoot root,
char *  tag,
char **  attributes 
)
static
static MagickBooleanType ValidateEntities ( char *  tag,
char *  xml,
const size_t  depth,
char **  entities 
)
static
static char* XMLTreeTagToXML ( XMLTreeInfo xml_info,
char **  source,
size_t *  length,
size_t *  extent,
size_t  start,
char ***  attributes 
)
static

Variable Documentation

const char* skip_tags[3]
static
Initial value:
=
{
"rdf:Bag",
"rdf:Seq",
(const char *) NULL
}

Referenced by IsSkipTag().