--- a/src/XMLCommand.h Fri Jan 11 01:13:40 2019 +0100
+++ b/src/XMLCommand.h Fri Jan 11 12:04:45 2019 +0100
@@ -51,32 +51,33 @@
RelpipeSaxHandler(std::ostream& output) : DefaultHandler(), writer(Factory::create(output)) {
}
- void startElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh * const qname, const Attributes& attrs) override {
+ void startDocument() override {
//XMLString::
// TODO: remove demo
- writer->startRelation(L"xml_startElement",{
- {L"s", TypeId::STRING},
+ writer->startRelation(L"xml",{
+ {L"event", TypeId::STRING},
+ {L"data", TypeId::STRING},
}, true);
+ }
- writer->writeAttribute(L"a");
+ void startElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh * const qname, const Attributes& attrs) override {
+ writer->writeAttribute(L"startElement");
+ writer->writeAttribute(L"");
}
void endElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh * const qname) override {
- // TODO: remove demo
- writer->startRelation(L"xml_endElement",{
- {L"s", TypeId::STRING},
- }, true);
+ writer->writeAttribute(L"endElement");
+ writer->writeAttribute(L"");
+ }
- writer->writeAttribute(L"a");
+ void characters(const XMLCh * const chars, const XMLSize_t length) override {
+ writer->writeAttribute(L"characters");
+ writer->writeAttribute(to_wstring(length));
}
void endDocument() override {
- // TODO: remove demo
- writer->startRelation(L"xml_endDocument",{
- {L"s", TypeId::STRING},
- }, true);
-
- writer->writeAttribute(L"a");
+ writer->writeAttribute(L"endDocument");
+ writer->writeAttribute(L"");
}
};