• 风行天下1983
    了解作者
  • C/C++
    开发工具
  • 153KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 5
    下载次数
  • 2018-09-10 20:04
    上传日期
xml文件解析,可以实现XML文件的解析功能
mxml-2.9.rar
  • mxml-2.9
  • proj
  • Xml.IMD
    448B
  • Xml.IMB
    12KB
  • Xml.IAD
    608B
  • Xml.PRI
    30.1KB
  • Xml.PS
    71.2KB
  • Xml.PR
    5.1KB
  • Xml.PO
    776B
  • Xml.WK3
    19.6KB
  • Xml.PFI
    60B
  • Xml.IAB
    28KB
  • mxml-get.o
    9.4KB
  • mxml-index.o
    12.3KB
  • mxml-entity.o
    15.7KB
  • mxml-attr.o
    9.4KB
  • Makefile
    1.8KB
  • mxmldoc.c
    140.2KB
  • mxml-entity.c
    9.8KB
  • mxml.h
    11.9KB
  • mxml-string.c
    9.4KB
  • mxml-private.h
    1.1KB
  • mxml-node.c
    17.5KB
  • mxml-file.c
    63.4KB
  • mxml-search.c
    6.6KB
  • mxml-string.o
    4.9KB
  • config.h
    1.8KB
  • mxml-set.o
    10.1KB
  • mxml-attr.c
    6.8KB
  • mxml-node.o
    14.3KB
  • MakefileP1010
    1.9KB
  • MakefileP1010_e500
    2KB
  • mxml-private.c
    6.6KB
  • mxml-set.c
    7.3KB
  • MakefileDra62x
    2KB
  • mxml-search.o
    9.1KB
  • MakefileNR1119
    2KB
  • mxml-file.o
    58.5KB
  • mxml-private.o
    12.6KB
  • mxml-index.c
    13.4KB
  • testmxml.c
    19KB
  • mxml-get.c
    8KB
内容介绍
/*#define DEBUG 1*/ /* * "$Id: mxmldoc.c 451 2014-01-04 21:50:06Z msweet $" * * Documentation generator using Mini-XML, a small XML-like file parsing * library. * * Copyright 2003-2014 by Michael R Sweet. * * These coded instructions, statements, and computer programs are the * property of Michael R Sweet and are protected by Federal copyright * law. Distribution and use rights are outlined in the file "COPYING" * which should have been included with this file. If this file is * missing or damaged, see the license at: * * http://www.minixml.org/ */ /* * Include necessary headers... */ #include "config.h" #include "mxml.h" #include <time.h> #include <sys/stat.h> #ifndef WIN32 # include <dirent.h> # include <unistd.h> #endif /* !WIN32 */ #ifdef __APPLE__ # include <spawn.h> # include <sys/wait.h> extern char **environ; #endif /* __APPLE__ */ /* * This program scans source and header files and produces public API * documentation for code that conforms to the CUPS Configuration * Management Plan (CMP) coding standards. Please see the following web * page for details: * * http://www.cups.org/cmp.html * * Using Mini-XML, this program creates and maintains an XML representation * of the public API code documentation which can then be converted to HTML * as desired. The following is a poor-man's schema: * * <?xml version="1.0"?> * <mxmldoc xmlns="http://www.easysw.com" * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" * xsi:schemaLocation="http://www.minixml.org/mxmldoc.xsd"> * * <namespace name=""> [optional...] * <constant name=""> * <description>descriptive text</description> * </constant> * * <enumeration name=""> * <description>descriptive text</description> * <constant name="">...</constant> * </enumeration> * * <typedef name=""> * <description>descriptive text</description> * <type>type string</type> * </typedef> * * <function name="" scope=""> * <description>descriptive text</description> * <argument name="" direction="I|O|IO" default="" rel='nofollow' onclick='return false;'> * <description>descriptive text</description> * <type>type string</type> * </argument> * <returnvalue> * <description>descriptive text</description> * <type>type string</type> * </returnvalue> * <seealso>function names separated by spaces</seealso> * </function> * * <variable name="" scope=""> * <description>descriptive text</description> * <type>type string</type> * </variable> * * <struct name=""> * <description>descriptive text</description> * <variable name="">...</variable> * <function name="">...</function> * </struct> * * <union name=""> * <description>descriptive text</description> * <variable name="">...</variable> * </union> * * <class name="" parent=""> * <description>descriptive text</description> * <class name="">...</class> * <enumeration name="">...</enumeration> * <function name="">...</function> * <struct name="">...</struct> * <variable name="">...</variable> * </class> * </namespace> * </mxmldoc> */ /* * Basic states for file parser... */ #define STATE_NONE 0 /* No state - whitespace, etc. */ #define STATE_PREPROCESSOR 1 /* Preprocessor directive */ #define STATE_C_COMMENT 2 /* Inside a C comment */ #define STATE_CXX_COMMENT 3 /* Inside a C++ comment */ #define STATE_STRING 4 /* Inside a string constant */ #define STATE_CHARACTER 5 /* Inside a character constant */ #define STATE_IDENTIFIER 6 /* Inside a keyword/identifier */ /* * Output modes... */ #define OUTPUT_NONE 0 /* No output */ #define OUTPUT_HTML 1 /* Output HTML */ #define OUTPUT_XML 2 /* Output XML */ #define OUTPUT_MAN 3 /* Output nroff/man */ #define OUTPUT_TOKENS 4 /* Output docset Tokens.xml file */ /* * Local functions... */ static mxml_node_t *add_variable(mxml_node_t *parent, const char *name, mxml_node_t *type); static mxml_node_t *find_public(mxml_node_t *node, mxml_node_t *top, const char *name); static char *get_comment_info(mxml_node_t *description); static char *get_text(mxml_node_t *node, char *buffer, int buflen); static mxml_type_t load_cb(mxml_node_t *node); static mxml_node_t *new_documentation(mxml_node_t **mxmldoc); static int remove_directory(const char *path); static void safe_strcpy(char *dst, const char *src); static int scan_file(const char *filename, FILE *fp, mxml_node_t *doc); static void sort_node(mxml_node_t *tree, mxml_node_t *func); static void update_comment(mxml_node_t *parent, mxml_node_t *comment); static void usage(const char *option); static void write_description(FILE *out, mxml_node_t *description, const char *element, int summary); static void write_element(FILE *out, mxml_node_t *doc, mxml_node_t *element, int mode); static void write_file(FILE *out, const char *file); static void write_function(FILE *out, mxml_node_t *doc, mxml_node_t *function, int level); static void write_html(const char *section, const char *title, const char *footerfile, const char *headerfile, const char *introfile, const char *cssfile, const char *framefile, const char *docset, const char *docversion, const char *feedname, const char *feedurl, mxml_node_t *doc); static void write_html_head(FILE *out, const char *section, const char *title, const char *cssfile); static void write_man(const char *man_name, const char *section, const char *title, const char *headerfile, const char *footerfile, const char *introfile, mxml_node_t *doc); static void write_scu(FILE *out, mxml_node_t *doc, mxml_node_t *scut); static void write_string(FILE *out, const char *s, int mode); static void write_toc(FILE *out, mxml_node_t *doc, const char *introfile, const char *target, int xml); static void write_tokens(FILE *out, mxml_node_t *doc, const char *path); static const char *ws_cb(mxml_node_t *node, int where); /* * 'main()' - Main entry for test program. */ int /* O - Exit status */ main(int argc, /* I - Number of command-line args */ char *argv[]) /* I - Command-line args */ { int i; /* Looping var */ int len; /* Length of argument */ FILE *fp; /* File to read */ mxml_node_t *doc; /* XML documentation tree */ mxml_node_t *mxmldoc; /* mxmldoc node */ const char *cssfile, /* CSS stylesheet file */ *docset, /* Documentation set directory */ *docversion, /* Documentation set version */ *feedname, /* Feed name for documentation set */ *feedurl, /* Feed URL for documentation set */ *footerfile, /* Footer file */ *framefile, /* Framed HTML basename */ *headerfile, /* Header file */ *introfile, /* Introduction file */ *name, /* Name of manpage */ *path, /* Path to help file for tokens */ *section, /* Section/keywords of documentation */ *title, /* Title of documentation */ *xmlfile; /* XML file */ int mode, /* Output mode */ update; /* Updated XML file */ /* * Check arguments... */ cssfile = NULL; doc = NULL; docset = NULL; docversion = NULL; feedname = NULL; feedurl = NULL; footerfile = NULL; framefile = NULL; headerfile = NULL; introfile = NULL; mode = OUTPUT_HTML; mxmldoc = NULL; name = NULL; path = NULL; section = NULL; title = NULL; update = 0; xmlfile = NULL; for (i = 1; i < argc; i ++) if (!strcmp(argv[i], "--help")) { /* * Show help... */ usage(NULL); } else if (!strcmp(argv[i], "--version")) {
评论
    相关推荐
    • M2MXML-C-开源
      M2MXML-C是用ANSI-C编写的嵌入式代码框架,用于与M2MXML通信的设备。
    • FLEX入门教程 初学者 mxml
      非常适合初学者入门的一本书,pdf格式 MXML ActionScript Flex中的事件 Flex的组件概述 ......
    • ml2mxml:从ocaml创建musicxml文件
      ml2mxml是OCaml库,用于生成musicxml( )文件。 该库的开发有两个原因: 在乐谱编辑器中缺少“ git”提供的内容, 使用Guitar Pro 6的剪切/复制/粘贴功能( )时会遇到困难。 使用该库,音乐可以写成: 编写...
    • M2MXML-开源
      M2MXML是用于机器对机器通信的基于XML的协议。 M2MXML项目包括用于解析M2MXML的Java API,但旨在与语言无关。
    • Mxml-C语言解析XML代码
      纯C语言编写的XML文件解析工具,可以解析,修改XML文件,并且编译成库文件可以包含使用
    • mxml-2.11.zip
      xml更轻巧,使用简便,可随自己代码编译的minixml库源代码
    • mxml2.0 源码
      mxml 源码
    • AsmXml-开源
      AsmXml是用于使用纯汇编程序编写的x86平台的非常快速的XML解析器库。
    • mxml-2.7.tar
      mxml-2.7.tar基于c语言的xml解析源码
    • photoshow flex+flash+mxml
      flex+flash+mxml = 绚丽相册实现 简单精美欢迎下载