XML Parser for Libsvgtiny
source link: https://blog.joouis.com/2020/evgui-xml-parser/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Libxml2 資料結構
/**
* xmlNode:
*
* A node in an XML tree.
*/
typedef struct _xmlNode xmlNode;
typedef xmlNode *xmlNodePtr;
struct _xmlNode {
void *_private; /* application data */
xmlElementType type; /* type number, must be second ! */
const xmlChar *name; /* the name of the node, or the entity */
struct _xmlNode *children; /* parent->childs link */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
/* End of common part */
xmlNs *ns; /* pointer to the associated namespace */
xmlChar *content; /* the content */
struct _xmlAttr *properties;/* properties list */
xmlNs *nsDef; /* namespace definitions on this node */
void *psvi; /* for type/PSVI informations */
unsigned short line; /* line number */
unsigned short extra; /* extra data for XPath/XSLT */
};
/**
* xmlDoc:
*
* An XML document.
*/
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc *xmlDocPtr;
struct _xmlDoc {
void *_private; /* application data */
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
struct _xmlNode *children; /* the document tree */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* autoreference to itself */
/* End of common part */
int compression; /* level of zlib compression */
int standalone; /* standalone document (no external refs)
¦ 1 if standalone="yes"
¦ 0 if standalone="no"
¦ -1 if there is no XML declaration
¦ -2 if there is an XML declaration, but no
standalone attribute was specified */
struct _xmlDtd *intSubset; /* the document internal subset */
struct _xmlDtd *extSubset; /* the document external subset */
struct _xmlNs *oldNs; /* Global namespace, the old way */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* external initial encoding, if any */
void *ids; /* Hash table for ID attributes if any */
void *refs; /* Hash table for IDREFs attributes if any */
const xmlChar *URL; /* The URI for that document */
int charset; /* encoding of the in-memory contentactually an
¦ xmlCharEncoding */
struct _xmlDict *dict; /* dict used to allocate names or NULL */
void *psvi; /* for type/PSVI informations */
int parseFlags; /* set of xmlParserOption used to parse the
¦ document */
int properties; /* set of xmlDocProperties for this document set
¦ at the end of parsing */
};
/**
* xmlAttribute:
*
* An Attribute declaration in a DTD.
*/
typedef struct _xmlAttribute xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
struct _xmlAttribute {
void *_private; /* application data */
xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
const xmlChar *name; /* Attribute name */
struct _xmlNode *children; /* NULL */
struct _xmlNode *last; /* NULL */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
struct _xmlAttribute *nexth; /* next in hash table */
xmlAttributeType atype; /* The attribute type */
xmlAttributeDefault def; /* the default */
const xmlChar *defaultValue; /* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
const xmlChar *prefix; /* the namespace prefix if any */
const xmlChar *elem; /* Element holding the attribute */
};
Recommend
-
51
Golang xml演示
-
57
juniper-PDFs-junos-131,分享给有需要的人
-
49
juniper-PDFs-junos-131,分享给有需要的人
-
36
In this tutorial a xml file will be parsed using a XMLParser object. The results of the parsing will be displayed in a Table View. This tutorial is made with Xcode 10 and built for iOS 12. Open Xcode and create...
-
35
postcss-xml-transform A tiny transform library that lets you write CSS using XML Usage const postcss...
-
35
XML-RPC is yet another method of implementing remote procedure calls. It used XML over HTTP to transmit data. In my past live working at
-
10
xml_parser_create_ns() Function Related Articles ...
-
3
fxml - FreeStyle XML Parser This package provides a simple parser which reads a XML document and output a tree structure, which does not need a pre-defined struct, hence the name "FreeStyle". See...
-
3
Xerces – Java XML Parser Primer /home/robonovotny Xerces – Java XML Parser Primer 2005/02/01 DOM v Xercesovi
-
1
这是我的硕士论文笔记系列第二篇,原文写于 2016 年五月。 SVG Tiny 1.2 Spec The SVG Working Group does not provid...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK