michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
426 stars 157 forks source link

Simplified file loading option? #291

Closed bucanero closed 2 months ago

bucanero commented 2 years ago

Hi,

Could we add another loading option that takes a file path string and returns the XML tree?

Something like:

mxml_node_t *tree;

tree = mxmlLoadFilePath(NULL, "/path/to/filename.xml", MXML_OPAQUE_CALLBACK);

I know it's a trivial wrapper on mxmlLoadFile() but I think it could be useful for new users.

michaelrsweet commented 2 months ago

Added in latest Git master.