Starlink-AST
view release on metacpan or search on metacpan
ast/src/xml.h view on Meta::CPAN
typedef struct AstXmlDocument AstXmlDocument;
typedef struct AstXmlPrologue AstXmlPrologue;
typedef struct AstXmlDeclPI AstXmlDeclPI;
typedef struct AstXmlDTDec AstXmlDTDec;
/* The following data types define "interfaces". That is each data type
corresponds to a subset of the above classes. */
/* Marks a class as "character data" */
typedef AstXmlObject AstXmlCharData;
/* Marks a class as a "content item" */
typedef AstXmlObject AstXmlContentItem;
/* Marks a class as a "miscalleneous item" */
typedef AstXmlObject AstXmlMiscItem;
/* Marks a class as being able to own a child */
typedef AstXmlObject AstXmlParent;
/* XmlObject structure. */
/* -------------------- */
/* Contains data common to all other structures */
struct AstXmlObject {
AstXmlParent *parent; /* The parent which contains this XmlObject */
long int type; /* An ID giving the type of structure */
int id; /* A unique id for this object. */
};
/* XmlAttribute structure. */
/* ----------------------- */
/* Describes an XML attribute */
struct AstXmlAttribute {
AstXmlObject obj; /* General information for this XmlObject */
char *name; /* The name of the attribute */
char *value; /* Attribute value */
char *prefix; /* Namespace prefix for this attribute */
};
/* XmlNamespace structure. */
/* ----------------------- */
/* Describes an XML namespace definition */
struct AstXmlNamespace {
AstXmlObject obj; /* General information for this XmlObject */
char *prefix; /* Namespace prefix */
char *uri; /* Namespace URI */
};
/* XmlElement structure. */
/* --------------------- */
/* Describes an XML element */
struct AstXmlElement {
AstXmlObject obj; /* General information for this XmlObject */
char *name; /* The type (name) of the element */
AstXmlAttribute **attrs; /* Ptr. to list of attributes of the element */
int nattr; /* Number of attributes in the above list */
AstXmlContentItem **items; /* Ptr. to list of items in the element's content */
int nitem; /* Number of items in above list */
char *defns; /* Default Namespace URI for element content */
char *prefix; /* Namespace prefix for this element */
AstXmlNamespace **nsprefs; /* Ptr. to list of new Namespaces defined by this element */
int nnspref; /* Number of Namespaces in above list */
int complete; /* Have the contents of the element been read? */
};
/* XmlBlack structure. */
/* ---------------------- */
/* Describes character data containing at least one non-blank character. */
struct AstXmlBlack {
AstXmlObject obj; /* General information for this XmlObject */
char *text; /* The character data */
};
/* XmlWhite structure. */
/* ------------------- */
/* Describes character data containing no one non-blank characters. */
struct AstXmlWhite {
AstXmlObject obj; /* General information for this XmlObject */
char *text; /* The white character data */
};
/* XmlCDataSection structure. */
/* ----------------------- */
/* Describes an XML CDATA section */
struct AstXmlCDataSection {
AstXmlObject obj; /* General information for this XmlObject */
char *text; /* The text of the cdata section */
};
/* XmlComment structure. */
/* --------------------- */
/* Describes an XML CDATA section */
struct AstXmlComment {
AstXmlObject obj; /* General information for this XmlObject */
char *text; /* The text of the comment */
};
/* XmlPI structure. */
/* ---------------- */
/* Describes an XML processing instruction */
struct AstXmlPI {
AstXmlObject obj; /* General information for this XmlObject */
char *target; /* The target of the processing instruction */
char *text; /* The text of the processing instruction */
};
/* XmlDocument structure. */
/* ---------------------- */
/* Describes an entire XML document */
struct AstXmlDocument {
AstXmlObject obj; /* General information for this XmlObject */
AstXmlPrologue *prolog; /* Pointer to document prologue */
AstXmlElement *root; /* Pointer to root element */
AstXmlMiscItem **epilog; /* List of XmlObjects forming the document epilogue */
int nepi; /* No of XmlObjects pointers in "epilogue" */
AstXmlElement *current; /* Pointer to element being read */
};
/* XmlPrologue structure. */
/* ---------------------- */
/* Describes an XML document prologue */
( run in 0.687 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )