16 #ifndef XML_CLEANER_HPP
17 #define XML_CLEANER_HPP
19 #include <Poco/DOM/DOMParser.h>
20 #include <Poco/DOM/DOMWriter.h>
21 #include <Poco/DOM/Document.h>
22 #include <Poco/DOM/NodeIterator.h>
23 #include <Poco/DOM/NodeFilter.h>
24 #include <Poco/DOM/AutoPtr.h>
25 #include <Poco/DOM/NamedNodeMap.h>
26 #include <Poco/XML/XMLWriter.h>
27 #include <Poco/SAX/InputSource.h>
28 #include <Poco/SharedPtr.h>
33 enum class ResOmitType : std::uint8_t {ROM_NOT_OMIT = 0, ROM_EMPTY_OMIT = 1, ROM_NOT_NUM_OMIT = 2};
38 const std::string XMLPath;
39 const std::string elemName;
40 const std::string idName;
43 std::string
saveXML(Poco::XML::Node* node);
44 inline bool isOmitNode(
const Poco::XML::XMLString &nodeValue);
47 XMLCleaner(
const std::string &_XMLPath,
const std::string &_elemName,
const std::string &_idName,
ResOmitType _resOmitType = ResOmitType::ROM_NOT_OMIT):
48 XMLPath(_XMLPath), elemName(_elemName), idName(_idName), resOmitType(_resOmitType) {}
51 std::string
process(
const std::string &inXML,
const std::set<std::string> &delList);