11.07.2014 Views

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX B. PROGRAM LISTINGS 279<br />

Parameters:<br />

node: the supplied xmlNodePtr.<br />

expected_name: the expected element name.<br />

Returns:<br />

1 if names are equivalent.<br />

0 otherwise.<br />

*/<br />

int assertXMLElement(xmlNodePtr node, const char* expectedname);<br />

/*<br />

Asserts that the supplied element node is the same type<br />

as the expected element name.<br />

Parameters:<br />

node: the supplied xmlNodePtr.<br />

expectedname: the expected element name.<br />

Returns:<br />

1 if names are equivalent.<br />

0 otherwise (also prints error to stderr).<br />

*/<br />

char* getXMLAttribute(xmlNodePtr node, const char* attributename);<br />

/*<br />

Retrieves the attribute value <strong>of</strong> a given attribute name within<br />

a given node.<br />

Parameters:<br />

node: the supplied xmlNodePtr.<br />

attributename: the supplied attribute name.<br />

Returns:<br />

The attribute value.<br />

NULL if attribute does not exist.<br />

*/<br />

double getXMLDoubleAttribute(xmlNodePtr node,<br />

const char* attributename);<br />

/*<br />

Retrieves the attribute value <strong>of</strong> a given attribute name within<br />

a given node (as a double).<br />

Parameters:<br />

node: the supplied xmlNodePtr.<br />

attributename: the supplied attribute name.<br />

Returns:<br />

The attribute value.<br />

*/<br />

char* getXMLData(xmlDocPtr doc, xmlNodePtr node);<br />

/*<br />

Retrieves the element data within a given node.<br />

Parameters:<br />

doc: the supplied xmlDocPtr.<br />

node: the supplied xmlNodePtr.<br />

Returns:<br />

The element's value.<br />

*/<br />

int getXMLIntegerData(xmlDocPtr doc, xmlNodePtr node);<br />

/*<br />

Retrieves the integer element data within a given node.<br />

Parameters:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!