tools/rpmxp.c File Reference

#include "system.h"
#include <header.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.
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.

Variables

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


Define Documentation

#define _RPMXP_INTERNAL

Definition at line 5 of file rpmxp.c.


Function Documentation

rpmxp rpmxpFree ( rpmxp  xp  ) 

Destroy an xml parser.

Parameters:
xp rpm xml parser
Returns:
NULL always

Definition at line 23 of file rpmxp.c.

rpmxp rpmxpNew ( const char *  fn  ) 

Create an xml parser.

Parameters:
fn xml file name
Returns:
new xml parser

Definition at line 44 of file rpmxp.c.

References rpmxpFree().

int rpmxpParseFile ( rpmxp  xp  ) 

Parse all elements from an xml parser.

Parameters:
xp rpm xml parser
Returns:
0 on success

Definition at line 157 of file rpmxp.c.

References rpmxpProcess(), and rpmxpRead().

int rpmxpProcess ( rpmxp  xp  ) 

Parse all elements from an xml parser.

Parameters:
xp rpm xml parser
Returns:
0 on success

Definition at line 72 of file rpmxp.c.

References _rpmxp_debug, Fclose(), Fopen(), HEADER_MAGIC_YES, headerAddEntry(), headerAddI18NString(), headerAddOrAppendEntry(), headerFree(), headerNew(), headerWrite(), myTagByName(), RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmTagTable, headerTagTableEntry_s::type, and headerTagTableEntry_s::val.

int rpmxpRead ( rpmxp  xp  ) 

Read next item from an xml parser.

Parameters:
xp rpm xml parser
Returns:
1 to continue

Definition at line 67 of file rpmxp.c.


Variable Documentation

int _rpmxp_debug = 0

Definition at line 9 of file rpmxp.c.

const char* program_name

Definition at line 2 of file rpmxp.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 rpmxp.c.


Generated on Mon Mar 5 13:30:33 2007 for rpm by  doxygen 1.5.1