This module kicks out the database in XML format. If you have an
XSL-capable browser, you should be able to read these files directly --
and not coincidently eliminate the need for most of the other modules!
Meanwhile, you can still use these with tools like 'nsgmls'.
Included Files
Preprocessor definitions
#define OUTPUT_DIR "xml"
#define OUTPUT_FILE "xml/all.xml"
struct item
struct item |
|
{ |
|
char* name; |
|
int flags; |
|
int cnt; |
|
} |
|
struct magpie_module magpie_module
struct magpie_module mod_core_xml
Local Variables
rcsid
static const char rcsid[]
items
static struct item items[16*1024]
itemcnt
static int itemcnt
dtd
static const char dtd[]
static int id_cmp ( const void* p, const void* q )
static void id_ctor ( void )
static void id_declare ( const char* name )
static void id_dtor ( void )
static void id_store ( const char* name )
static void id_undeclared ( FILE* fp )
Quote the 'description' field.
static void put_description ( FILE* fp, struct package_info* p )
static void put_list ( FILE* fp, const char* name, struct package_list* d )
Write the XML information about a single package.
static void put_package ( FILE* fp, struct package_info* p )
Create basic XML documents
static int xml_init ( void )
Put a simple "name:value" pair.
static void xml_name_value ( FILE* fp, const char* name, const char* value )
Recreate "packages" list in XML format
static void xml_packages ( int sidx )
Quote any text which is written into an 'attribute'.
static void xml_quote_attribute ( FILE* fp, const char* p )
Calls:
| __assert_fail(), fputc(), fputs()
|
Quote any text which is written into a 'data' section.
static void xml_quote_data ( FILE* fp, const char* p )
Quote any text which is written into an 'id' attribute.
static void xml_quote_id ( FILE* fp, const char* p )
static void xml_quote_ids ( FILE* fp, struct package_list* d )
Recreate "status" list in XML format
We don't record conffiles (and other stuff?) yet.
static void xml_status ( void )