18 #import "OFXMLAttribute.h"
20 OF_ASSUME_NONNULL_BEGIN
22 @class OFArray OF_GENERIC(ObjectType);
44 foundProcessingInstructions: (
OFString *)processingInstructions;
116 foundUnknownEntityNamed: (
OFString *)entity;
127 OF_SUBCLASSING_RESTRICTED
131 enum of_xml_parser_state {
132 OF_XMLPARSER_IN_BYTE_ORDER_MARK,
133 OF_XMLPARSER_OUTSIDE_TAG,
134 OF_XMLPARSER_TAG_OPENED,
135 OF_XMLPARSER_IN_PROCESSING_INSTRUCTIONS,
136 OF_XMLPARSER_IN_TAG_NAME,
137 OF_XMLPARSER_IN_CLOSE_TAG_NAME,
139 OF_XMLPARSER_IN_ATTRIBUTE_NAME,
140 OF_XMLPARSER_EXPECT_ATTRIBUTE_EQUAL_SIGN,
141 OF_XMLPARSER_EXPECT_ATTRIBUTE_DELIMITER,
142 OF_XMLPARSER_IN_ATTRIBUTE_VALUE,
143 OF_XMLPARSER_EXPECT_TAG_CLOSE,
144 OF_XMLPARSER_EXPECT_SPACE_OR_TAG_CLOSE,
145 OF_XMLPARSER_IN_EXCLAMATION_MARK,
146 OF_XMLPARSER_IN_CDATA_OPENING,
147 OF_XMLPARSER_IN_CDATA,
148 OF_XMLPARSER_IN_COMMENT_OPENING,
149 OF_XMLPARSER_IN_COMMENT_1,
150 OF_XMLPARSER_IN_COMMENT_2,
151 OF_XMLPARSER_IN_DOCTYPE
154 const char *_Nullable _data;
156 OFString *_Nullable _name, *_Nullable _prefix;
161 OFString *_Nullable _attributeName, *_Nullable _attributePrefix;
167 bool _lastCarriageReturn, _finishedParsing;
175 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
181 @property (readonly, nonatomic)
size_t lineNumber;
186 @property (readonly, nonatomic)
bool hasFinishedParsing;
195 @property (nonatomic)
size_t depthLimit;
202 + (instancetype)parser;
210 - (
void)parseBuffer: (const
char *)buffer length: (
size_t)length;
217 - (
void)parseString: (
OFString *)
string;
224 - (
void)parseStream: (
OFStream *)stream;
227 OF_ASSUME_NONNULL_END
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:68
struct objc_object * id
A pointer to any object.
Definition: ObjFWRT.h:90
An abstract class for storing objects in an array.
Definition: OFArray.h:92
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:44
A class for storing and manipulating arbitrary data in an array.
Definition: OFMutableData.h:29
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:44
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A base class for different types of streams.
Definition: OFStream.h:191
A class for handling strings.
Definition: OFString.h:132
A representation of an attribute of an XML element as an object.
Definition: OFXMLAttribute.h:28
An event-based XML parser.
Definition: OFXMLParser.h:129
A protocol that needs to be implemented by delegates for OFXMLParser.
Definition: OFXMLParser.h:34