SQLite Forum

XML extension
Login
I made a small extension ([link](https://github.com/little-brother/sqlite-gui/blob/master/extensions/xml.cpp)) to processing XML. It uses a [pugixml](https://pugixml.org/)-library to parse XML-tree.<br>
There are five scalar functions and one table-valued. Usage examples can be found in the code and in a [Wiki](https://github.com/little-brother/sqlite-gui/wiki#extensions).<br>
`xml_valid(xml)
xml_extract(xml, xpath, sep = "")
xml_append(xml, xpath, insertion, pos = after)
xml_update(xml, xpath, replacement)
xml_remove(xml, xpath)
xml_each(xml, xpath)
`

It looks like XML-format is more dead than alive replaced by json, yaml and protobuf. And parsing XML is not usual in databases too.<br>
But perhaps this extension will be useful to someone. 




The extension can be build by mingw like that: `g++ -I ../include -shared xml.cpp ../include/pugixml.cpp -o xml.dll -s -static -DPUGIXML_NO_STL -Os`