tools/rpmxml.c File Reference

#include "system.h"
#include <rpmlib.h>
#include "rpmxp.h"
#include "debug.h"

Go to the source code of this file.

Defines

#define _RPMXP_INTERNAL

Functions

rpmxp rpmxpFree (rpmxp xp)
 Destroy an xml parser.
rpmxp rpmxpNew (const char *fn)
 Create an xml parser.
static headerTagTableEntry myTagByName (headerTagTableEntry tbl, const char *name)
 Return tag table entry from name lookup.
int rpmxpRead (rpmxp xp)
 Read next item from an xml parser.
int rpmxpProcess (rpmxp xp)
 Parse all elements from an xml parser.
int rpmxpParseFile (rpmxp xp)
 Parse all elements from an xml parser.
int main (int argc, char **argv)

Variables

const char * program_name
int _rpmxp_debug = 0
const char * rpmxpDTD


Define Documentation

#define _RPMXP_INTERNAL

Definition at line 5 of file rpmxml.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 261 of file rpmxml.c.

References rpmxpFree(), rpmxpNew(), and rpmxpParseFile().

static headerTagTableEntry myTagByName ( headerTagTableEntry  tbl,
const char *  name 
) [static]

Return tag table entry from name lookup.

Todo:
bsearch on sorted name table.
Parameters:
tbl tag table
name tag name to find
Returns:
tag value, 0 on not found

Definition at line 74 of file rpmxml.c.

References headerTagTableEntry_s::name, and xstrcasecmp().

Referenced by rpmxpProcess().

rpmxp rpmxpFree ( rpmxp  xp  ) 

Destroy an xml parser.

Parameters:
xp rpm xml parser
Returns:
NULL always

Definition at line 23 of file rpmxml.c.

Referenced by main(), and rpmxpNew().

rpmxp rpmxpNew ( const char *  fn  ) 

Create an xml parser.

Parameters:
fn xml file name
Returns:
new xml parser

Definition at line 44 of file rpmxml.c.

Referenced by main().

int rpmxpParseFile ( rpmxp  xp  ) 

Parse all elements from an xml parser.

Parameters:
xp rpm xml parser
Returns:
0 on success

Definition at line 251 of file rpmxml.c.

Referenced by main().

int rpmxpProcess ( rpmxp  xp  ) 

Parse all elements from an xml parser.

Parameters:
xp rpm xml parser
Returns:
0 on success

Definition at line 91 of file rpmxml.c.

Referenced by rpmxpParseFile().

int rpmxpRead ( rpmxp  xp  ) 

Read next item from an xml parser.

Parameters:
xp rpm xml parser
Returns:
1 to continue

Definition at line 86 of file rpmxml.c.

Referenced by rpmxpParseFile().


Variable Documentation

int _rpmxp_debug = 0

Definition at line 9 of file rpmxml.c.

Referenced by rpmxpProcess().

const char* program_name

Definition at line 2 of file rpmxml.c.

const char* rpmxpDTD

Initial value:

 "\
<?xml version=\"1.0\"?>\n\
<!DOCTYPE rpmHeader [\n\
<!ELEMENT rpmHeader (rpmTag+)>\n\
<!ELEMENT rpmTag        (string+|integer+|base64+)>\n\
<!ATTLIST rpmTag name   CDATA #REQUIRED>\n\
<!ELEMENT string        (#PCDATA)>\n\
<!ELEMENT integer       (#PCDATA)>\n\
<!ELEMENT base64        (#PCDATA)>\n\
]>\n\
"

Definition at line 11 of file rpmxml.c.

Referenced by spewHeader().


Generated on Mon Mar 5 14:31:10 2007 for rpm by  doxygen 1.5.1