Lines Matching refs:parser
218 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in StartNamespaceHandler() local
220 parser->namespace_uris_.push(namespace_uri); in StartNamespaceHandler()
221 parser->event_queue_.push( in StartNamespaceHandler()
223 XML_GetCurrentLineNumber(parser->parser_), parser->depth_++, in StartNamespaceHandler()
230 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in StartElementHandler() local
233 XML_GetCurrentLineNumber(parser->parser_), in StartElementHandler()
234 parser->depth_++}; in StartElementHandler()
249 parser->event_queue_.push(std::move(data)); in StartElementHandler()
254 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in CharacterDataHandler() local
256 parser->event_queue_.push(EventData{Event::kText, XML_GetCurrentLineNumber(parser->parser_), in CharacterDataHandler()
257 parser->depth_, std::string(s, len)}); in CharacterDataHandler()
262 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in EndElementHandler() local
265 XML_GetCurrentLineNumber(parser->parser_), in EndElementHandler()
266 --(parser->depth_)}; in EndElementHandler()
270 parser->event_queue_.push(std::move(data)); in EndElementHandler()
275 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in EndNamespaceHandler() local
277 parser->event_queue_.push( in EndNamespaceHandler()
278 EventData{Event::kEndNamespace, XML_GetCurrentLineNumber(parser->parser_), in EndNamespaceHandler()
279 --(parser->depth_), prefix != nullptr ? prefix : std::string(), in EndNamespaceHandler()
280 parser->namespace_uris_.top()}); in EndNamespaceHandler()
281 parser->namespace_uris_.pop(); in EndNamespaceHandler()
286 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in CommentDataHandler() local
288 parser->event_queue_.push(EventData{Event::kComment, in CommentDataHandler()
289 XML_GetCurrentLineNumber(parser->parser_), in CommentDataHandler()
290 parser->depth_, comment}); in CommentDataHandler()
294 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in StartCdataSectionHandler() local
296 parser->event_queue_.push(EventData{Event::kCdataStart, in StartCdataSectionHandler()
297 XML_GetCurrentLineNumber(parser->parser_), in StartCdataSectionHandler()
298 parser->depth_ }); in StartCdataSectionHandler()
302 XmlPullParser* parser = reinterpret_cast<XmlPullParser*>(user_data); in EndCdataSectionHandler() local
304 parser->event_queue_.push(EventData{Event::kCdataEnd, in EndCdataSectionHandler()
305 XML_GetCurrentLineNumber(parser->parser_), in EndCdataSectionHandler()
306 parser->depth_ }); in EndCdataSectionHandler()
309 std::optional<StringPiece> FindAttribute(const XmlPullParser* parser, StringPiece name) { in FindAttribute() argument
310 auto iter = parser->FindAttribute("", name); in FindAttribute()
311 if (iter != parser->end_attributes()) { in FindAttribute()
317 std::optional<StringPiece> FindNonEmptyAttribute(const XmlPullParser* parser, StringPiece name) { in FindNonEmptyAttribute() argument
318 auto iter = parser->FindAttribute("", name); in FindNonEmptyAttribute()
319 if (iter != parser->end_attributes()) { in FindNonEmptyAttribute()