dancer-xml Reference  0.8.2.1
Functions
loadxmlhelper.c File Reference

Helper functions for processing the loaded XML file. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dancer-xml.h"

Functions

dxml_elementdxml_next_notPCDATA (dxml_element *e)
 Obtain the next non-PCDATA, i.e. More...
 
dxml_elementdxml_get_element_byname (dxml_element *e, const char *name)
 Get the pointer to element by name. More...
 
static dxml_elementdxml_get_element_bysimplepath_internal (dxml_element *e, char *path)
 
dxml_elementdxml_get_element_bysimplepath (dxml_element *e, const char *path)
 Get the pointer to element by a simple path, using name/name/name notation. More...
 
char * dxml_get_PCDATA_bysimplepath (dxml_element *e, const char *path)
 Obtain the PCDATA specified with a simple path, using name/name/name notation. More...
 
static void space (int i)
 
static void recurse_attribute (dxml_attribute *a)
 
static void recurse_element (dxml_element *e, int level)
 
void dxml_dump_element (dxml_element *e)
 For debug, dump the element contents. More...
 

Detailed Description

Helper functions for processing the loaded XML file.

Function Documentation

void dxml_dump_element ( dxml_element e)

For debug, dump the element contents.

Parameters
econtent to be dumped

References recurse_element().

Referenced by get_bookchapter(), get_itemizedlist(), and get_paratype().

dxml_element* dxml_get_element_byname ( dxml_element e,
const char *  name 
)

Get the pointer to element by name.

Parameters
eelement
nameThe name of the element

References dxml_element::element_name, dxml_element::element_type_element, and dxml_element::next.

Referenced by dxml_get_element_bysimplepath_internal(), get_table(), main(), process_file(), and recursebook().

dxml_element* dxml_get_element_bysimplepath ( dxml_element e,
const char *  path 
)

Get the pointer to element by a simple path, using name/name/name notation.

Parameters
eelement

References dxml_get_element_bysimplepath_internal().

Referenced by dxml_get_element_bysimplepath_internal(), get_table(), main(), and print_kanrisha_info().

static dxml_element* dxml_get_element_bysimplepath_internal ( dxml_element e,
char *  path 
)
static
char* dxml_get_PCDATA_bysimplepath ( dxml_element e,
const char *  path 
)

Obtain the PCDATA specified with a simple path, using name/name/name notation.

Parameters
eelement
pathpath to PCDATA

References dxml_element::child, dxml_get_element_bysimplepath_internal(), dxml_element::element_name, dxml_element::element_type_pcdata, and dxml_element::next.

Referenced by get_bookchapter(), get_PCDATA_bysimplepath_i(), get_table(), main(), and recursebook().

dxml_element* dxml_next_notPCDATA ( dxml_element e)

Obtain the next non-PCDATA, i.e.

element

Parameters
eelement pointer

References dxml_element::element_type_pcdata, and dxml_element::next.

static void recurse_attribute ( dxml_attribute a)
static
static void recurse_element ( dxml_element e,
int  level 
)
static
static void space ( int  i)
static

Referenced by recurse_element().