xml-tree.c File Reference

#include "magick/studio.h"
#include "magick/blob.h"
#include "magick/blob-private.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/image-private.h"
#include "magick/log.h"
#include "magick/memory_.h"
#include "magick/semaphore.h"
#include "magick/string_.h"
#include "magick/string-private.h"
#include "magick/token-private.h"
#include "magick/utility.h"
#include "magick/utility-private.h"
#include "magick/xml-tree.h"
#include "magick/xml-tree-private.h"
Include dependency graph for xml-tree.c:

Data Structures

struct  _XMLTreeInfo
struct  _XMLTreeRoot

Defines

#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]

Define Documentation

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

Typedef Documentation

typedef struct _XMLTreeRoot XMLTreeRoot

Function Documentation

MagickExport XMLTreeInfo* AddChildToXMLTree ( XMLTreeInfo xml_info,
const char *  tag,
const size_t  offset 
)
MagickExport XMLTreeInfo* AddPathToXMLTree ( XMLTreeInfo xml_info,
const char *  path,
const size_t  offset 
)
MagickExport char* CanonicalXMLContent ( const char *  content,
const MagickBooleanType  pedantic 
)
static char* ConvertUTF16ToUTF8 ( const char *  content,
size_t *  length 
) [static]
MagickExport XMLTreeInfo* DestroyXMLTree ( XMLTreeInfo xml_info  ) 
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 void DestroyXMLTreeRoot ( XMLTreeInfo xml_info  )  [static]
static char* EncodePredefinedEntities ( const char *  source,
ssize_t  offset,
char **  destination,
size_t *  length,
size_t *  extent,
MagickBooleanType  pedantic 
) [static]
MagickPrivate char* FileToXML ( const char *  filename,
const size_t  extent 
)
MagickExport XMLTreeInfo* GetNextXMLTreeTag ( XMLTreeInfo xml_info  ) 
MagickExport const char* GetXMLTreeAttribute ( XMLTreeInfo xml_info,
const char *  tag 
)
MagickExport MagickBooleanType GetXMLTreeAttributes ( const XMLTreeInfo xml_info,
SplayTreeInfo attributes 
)
MagickExport XMLTreeInfo* GetXMLTreeChild ( XMLTreeInfo xml_info,
const char *  tag 
)
MagickExport const char* GetXMLTreeContent ( XMLTreeInfo xml_info  ) 
MagickExport XMLTreeInfo* GetXMLTreeOrdered ( XMLTreeInfo xml_info  ) 
MagickExport XMLTreeInfo* GetXMLTreePath ( XMLTreeInfo xml_info,
const char *  path 
)
MagickExport const char** GetXMLTreeProcessingInstructions ( XMLTreeInfo xml_info,
const char *  target 
)
MagickExport XMLTreeInfo* GetXMLTreeSibling ( XMLTreeInfo xml_info  ) 
MagickExport const char* GetXMLTreeTag ( XMLTreeInfo xml_info  ) 
MagickExport XMLTreeInfo* InsertTagIntoXMLTree ( XMLTreeInfo xml_info,
XMLTreeInfo child,
const size_t  offset 
)
static MagickBooleanType IsSkipTag ( const char *  tag  )  [inline, static]

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

Referenced by NewXMLTree().

MagickExport XMLTreeInfo* NewXMLTree ( const char *  xml,
ExceptionInfo exception 
)
MagickExport XMLTreeInfo* NewXMLTreeTag ( const char *  tag  ) 
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 MagickBooleanType ParseInternalDoctype ( XMLTreeRoot root,
char *  xml,
size_t  length,
ExceptionInfo exception 
) [static]
static void ParseOpenTag ( XMLTreeRoot root,
char *  tag,
char **  attributes 
) [static]
static void ParseProcessingInstructions ( XMLTreeRoot root,
char *  xml,
size_t  length 
) [static]
MagickExport XMLTreeInfo* PruneTagFromXMLTree ( XMLTreeInfo xml_info  ) 
MagickExport XMLTreeInfo* SetXMLTreeAttribute ( XMLTreeInfo xml_info,
const char *  tag,
const char *  value 
)
MagickExport XMLTreeInfo* SetXMLTreeContent ( XMLTreeInfo xml_info,
const char *  content 
)
static MagickBooleanType ValidateEntities ( char *  tag,
char *  xml,
const size_t  depth,
char **  entities 
) [static]
MagickExport char* XMLTreeInfoToXML ( XMLTreeInfo xml_info  ) 
static char* XMLTreeTagToXML ( XMLTreeInfo xml_info,
char **  source,
size_t *  length,
size_t *  extent,
size_t  start,
char ***  attributes 
) [static]

Variable Documentation

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

Referenced by IsSkipTag().


Generated on 30 Sep 2019 for MagickCore by  doxygen 1.6.1