19 #import "OFXMLAttribute.h" 21 OF_ASSUME_NONNULL_BEGIN
23 @class OFArray OF_GENERIC(ObjectType);
45 foundProcessingInstructions: (
OFString *)pi;
87 foundCharacters: (
OFString *)characters;
120 foundUnknownEntityNamed: (
OFString *)entity;
133 id <OFXMLParserDelegate> _Nullable _delegate;
134 enum of_xml_parser_state {
135 OF_XMLPARSER_IN_BYTE_ORDER_MARK,
136 OF_XMLPARSER_OUTSIDE_TAG,
137 OF_XMLPARSER_TAG_OPENED,
138 OF_XMLPARSER_IN_PROCESSING_INSTRUCTIONS,
139 OF_XMLPARSER_IN_TAG_NAME,
140 OF_XMLPARSER_IN_CLOSE_TAG_NAME,
142 OF_XMLPARSER_IN_ATTRIBUTE_NAME,
143 OF_XMLPARSER_EXPECT_ATTRIBUTE_EQUAL_SIGN,
144 OF_XMLPARSER_EXPECT_ATTRIBUTE_DELIMITER,
145 OF_XMLPARSER_IN_ATTRIBUTE_VALUE,
146 OF_XMLPARSER_EXPECT_TAG_CLOSE,
147 OF_XMLPARSER_EXPECT_SPACE_OR_TAG_CLOSE,
148 OF_XMLPARSER_IN_EXCLAMATIONMARK,
149 OF_XMLPARSER_IN_CDATA_OPENING,
150 OF_XMLPARSER_IN_CDATA,
151 OF_XMLPARSER_IN_COMMENT_OPENING,
152 OF_XMLPARSER_IN_COMMENT_1,
153 OF_XMLPARSER_IN_COMMENT_2,
154 OF_XMLPARSER_IN_DOCTYPE,
155 OF_XMLPARSER_NUM_STATES
158 const char *_Nullable _data;
160 OFString *_Nullable _name, *_Nullable _prefix;
165 OFString *_Nullable _attributeName, *_Nullable _attributePrefix;
171 bool _lastCarriageReturn, _finishedParsing;
179 @property OF_NULLABLE_PROPERTY (
nonatomic, assign)
196 + (instancetype)parser;
204 - (
void)parseBuffer: (const
char *)buffer
205 length: (
size_t)length;
212 - (
void)parseString: (
OFString *)
string;
219 - (
void)parseStream: (
OFStream *)stream;
227 - (void)parseFile: (
OFString *)path;
245 OF_ASSUME_NONNULL_END
size_t depthLimit
Definition: OFXMLParser.h:190
size_t lineNumber()
Returns the current line number.
Definition: OFXMLParser.m:997
A class for handling strings.
Definition: OFString.h:114
A protocol that needs to be implemented by delegates for stringByXMLUnescapingWithHandler:.
nonatomic
Definition: OFXMLParser.h:180
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:39
The root class for all other classes inside ObjFW.
Definition: OFObject.h:379
An event-based XML parser.
Definition: OFXMLParser.h:131
An abstract class for storing objects in an array.
Definition: OFArray.h:89
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:53
A representation of an attribute of an XML element as an object.
Definition: OFXMLAttribute.h:28
A protocol that needs to be implemented by delegates for OFXMLParser.
Definition: OFXMLParser.h:28
bool hasFinishedParsing()
Returns whether the XML parser has finished parsing.
Definition: OFXMLParser.m:1002
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:40
A base class for different types of streams.
Definition: OFStream.h:88
A class for storing and manipulating arbitrary data in an array.
Definition: OFMutableData.h:29