forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVSXMLWriter.h
More file actions
executable file
·60 lines (49 loc) · 1.71 KB
/
VSXMLWriter.h
File metadata and controls
executable file
·60 lines (49 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// VSXMLWriter.h
//
// $Id: //poco/1.4/ProGen/src/VSXMLWriter.h#1 $
//
// Definition of the VSXMLWriter class.
//
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef VSXMLWriter_INCLUDED
#define VSXMLWriter_INCLUDED
#include "Poco/XML/XML.h"
#include "Poco/SAX/ContentHandler.h"
#include "Poco/SAX/Locator.h"
#include "Poco/SAX/Attributes.h"
#include "Poco/XML/XMLString.h"
#include <vector>
#include <ostream>
class VSXMLWriter: public Poco::XML::ContentHandler
{
public:
VSXMLWriter(std::ostream& ostr, bool convertBool);
~VSXMLWriter();
// ContentHandler
void setDocumentLocator(const Poco::XML::Locator* loc);
void startDocument();
void endDocument();
void startFragment();
void endFragment();
void startElement(const Poco::XML::XMLString& namespaceURI, const Poco::XML::XMLString& localName, const Poco::XML::XMLString& qname, const Poco::XML::Attributes& attributes);
void endElement(const Poco::XML::XMLString& namespaceURI, const Poco::XML::XMLString& localName, const Poco::XML::XMLString& qname);
void characters(const Poco::XML::XMLChar ch[], int start, int length);
void ignorableWhitespace(const Poco::XML::XMLChar ch[], int start, int length);
void processingInstruction(const Poco::XML::XMLString& target, const Poco::XML::XMLString& data);
void startPrefixMapping(const Poco::XML::XMLString& prefix, const Poco::XML::XMLString& namespaceURI);
void endPrefixMapping(const Poco::XML::XMLString& prefix);
void skippedEntity(const Poco::XML::XMLString& name);
protected:
void indent();
private:
std::ostream& _ostr;
bool _convertBool;
int _indent;
std::vector<bool> _tagClosed;
};
#endif // VSXMLWriter_INCLUDED