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 277<br />

Opens XML file <strong>and</strong> validates it against the (internally defined)<br />

DTD.<br />

Parameters:<br />

xml_filename: filename <strong>of</strong> the XML file.<br />

doc: pointer to xmlDocPtr initialised to xml_filename by libxml.<br />

Returns:<br />

1 if file is opened correctly <strong>and</strong> is valid.<br />

0 otherwise.<br />

*/<br />

int parseWoodwind(xmlDocPtr doc, Woodwind* w);<br />

/*<br />

Creates a Woodwind struct from data in the xml document.<br />

Parameters:<br />

doc: the parsed xmlDocPtr <strong>of</strong> the XML document.<br />

w: to be initialised with data in doc.<br />

Returns:<br />

1 if all parameters are valid.<br />

0 otherwise.<br />

*/<br />

int parseEmbouchureHole(xmlDocPtr doc, xmlNodePtr node,<br />

EmbouchureHole* h);<br />

/*<br />

Creates an EmbouchureHole struct from data in the xml document.<br />

Parameters:<br />

doc: the parsed xmlDocPtr <strong>of</strong> the XML document.<br />

node: the current node.<br />

h: to be initialised with data in doc.<br />

Returns:<br />

1 if all parameters are valid.<br />

0 otherwise.<br />

*/<br />

int parseHole(xmlDocPtr doc, xmlNodePtr node, Hole* h);<br />

/*<br />

Creates a Hole struct from data in the xml document.<br />

Parameters:<br />

doc: the parsed xmlDocPtr <strong>of</strong> the XML document.<br />

node: the current node.<br />

h: to be initialised with data in doc.<br />

Returns:<br />

1 if all parameters are valid.<br />

0 otherwise.<br />

*/<br />

int parseKey(xmlDocPtr doc, xmlNodePtr node, Key* k);<br />

/*<br />

Creates a Key struct from data in the xml document.<br />

Parameters:<br />

doc: the parsed xmlDocPtr <strong>of</strong> the XML document.<br />

node: the current node.<br />

k: to be initialised with data in doc.<br />

Returns:<br />

1 if all parameters are valid.<br />

0 otherwise.<br />

*/

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

Saved successfully!

Ooh no, something went wrong!