@@ -175,54 +175,31 @@ bool _lastCarriageReturn, _finishedParsing; of_string_encoding_t _encoding; size_t _depthLimit; } -#ifdef OF_HAVE_PROPERTIES +/*! + * The delegate that is used by the XML parser. + */ @property OF_NULLABLE_PROPERTY (assign) id delegate; + +/*! + * The depth limit for the XML parser. + * + * If the depth limit is exceeded, an OFMalformedXMLException is thrown. + * + * The default is 32. 0 means unlimited (insecure!). + */ @property size_t depthLimit; -#endif /*! * @brief Creates a new XML parser. * * @return A new, autoreleased OFXMLParser */ + (instancetype)parser; -/*! - * @brief Sets the delegate the XML parser should use. - * - * @param delegate The delegate to use - */ -- (void)setDelegate: (nullable id )delegate; - -/*! - * @brief Returns the delegate that is used by the XML parser. - * - * @return The delegate that is used by the XML parser - */ -- (nullable id )delegate; - -/*! - * @brief Returns the depth limit for the XML parser. - * - * @return The depth limit for the XML parser - */ -- (size_t)depthLimit; - -/*! - * @brief Sets the depth limit for the XML parser. - * - * If the depth limit is exceeded, an OFMalformedXMLException is thrown. - * - * The default is 32. 0 means unlimited (insecure!). - * - * @param depthLimit The depth limit for the XML parser - */ -- (void)setDepthLimit: (size_t)depthLimit; - /*! * @brief Parses the specified buffer with the specified size. * * @param buffer The buffer to parse * @param length The length of the buffer @@ -263,12 +240,12 @@ /*! * @brief Returns whether the XML parser has finished parsing. * * @return Whether the XML parser has finished parsing */ -- (bool)finishedParsing; +- (bool)hasFinishedParsing; @end @interface OFObject (OFXMLParserDelegate) @end OF_ASSUME_NONNULL_END