19 #import "OFXMLAttribute.h"
21 OF_ASSUME_NONNULL_BEGIN
25 @class OFArray OF_GENERIC(ObjectType);
38 #ifdef OF_HAVE_OPTIONAL_PROTOCOLS
49 foundProcessingInstructions: (
OFString*)pi;
91 foundCharacters: (
OFString*)characters;
124 foundUnknownEntityNamed: (
OFString*)entity;
137 id <OFXMLParserDelegate> _delegate;
139 OF_XMLPARSER_IN_BYTE_ORDER_MARK,
140 OF_XMLPARSER_OUTSIDE_TAG,
141 OF_XMLPARSER_TAG_OPENED,
142 OF_XMLPARSER_IN_PROCESSING_INSTRUCTIONS,
143 OF_XMLPARSER_IN_TAG_NAME,
144 OF_XMLPARSER_IN_CLOSE_TAG_NAME,
146 OF_XMLPARSER_IN_ATTRIBUTE_NAME,
147 OF_XMLPARSER_EXPECT_ATTRIBUTE_EQUAL_SIGN,
148 OF_XMLPARSER_EXPECT_ATTRIBUTE_DELIMITER,
149 OF_XMLPARSER_IN_ATTRIBUTE_VALUE,
150 OF_XMLPARSER_EXPECT_TAG_CLOSE,
151 OF_XMLPARSER_EXPECT_SPACE_OR_TAG_CLOSE,
152 OF_XMLPARSER_IN_EXCLAMATIONMARK,
153 OF_XMLPARSER_IN_CDATA_OPENING,
154 OF_XMLPARSER_IN_CDATA,
155 OF_XMLPARSER_IN_COMMENT_OPENING,
156 OF_XMLPARSER_IN_COMMENT_1,
157 OF_XMLPARSER_IN_COMMENT_2,
158 OF_XMLPARSER_IN_DOCTYPE,
159 OF_XMLPARSER_NUM_STATES
169 OFString *_attributeName, *_attributePrefix;
175 bool _lastCarriageReturn, _finishedParsing;
180 #ifdef OF_HAVE_PROPERTIES
182 @property
size_t depthLimit;
190 + (instancetype)parser;
211 - (size_t)depthLimit;
222 - (void)setDepthLimit: (
size_t)depthLimit;
230 - (void)parseBuffer: (const
char*)buffer
231 length: (
size_t)length;
238 - (void)parseString: (
OFString*)string;
245 - (void)parseStream: (
OFStream*)stream;
261 - (size_t)lineNumber;
268 - (bool)finishedParsing;
274 OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition: OFArray.h:95
A representation of an attribute of an XML element as an object.
Definition: OFXMLAttribute.h:28
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:50
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:46
A base class for different types of streams.
Definition: OFStream.h:86
A class for handling strings.
Definition: OFString.h:91
A class for storing arbitrary data in an array.
Definition: OFDataArray.h:37
A protocol that needs to be implemented by delegates for stringByXMLUnescapingWithHandler:.
Definition: OFString+XMLUnescaping.h:50
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:47
A protocol that needs to be implemented by delegates for OFXMLParser.
Definition: OFXMLParser.h:37
An event-based XML parser.
Definition: OFXMLParser.h:135