Home | History | Annotate | Download | only in xml

Lines Matching refs:parser

33   xml::XmlPullParser parser(str);
35 const size_t depth_outer = parser.depth();
36 ASSERT_TRUE(xml::XmlPullParser::NextChildNode(&parser, depth_outer));
38 EXPECT_EQ(xml::XmlPullParser::Event::kStartElement, parser.event());
39 EXPECT_EQ(StringPiece("a"), StringPiece(parser.element_name()));
41 const size_t depth_a = parser.depth();
42 ASSERT_TRUE(xml::XmlPullParser::NextChildNode(&parser, depth_a));
43 EXPECT_EQ(xml::XmlPullParser::Event::kStartElement, parser.event());
44 EXPECT_EQ(StringPiece("b"), StringPiece(parser.element_name()));
46 const size_t depth_b = parser.depth();
47 ASSERT_TRUE(xml::XmlPullParser::NextChildNode(&parser, depth_b));
48 EXPECT_EQ(xml::XmlPullParser::Event::kStartElement, parser.event());
49 EXPECT_EQ(StringPiece("c"), StringPiece(parser.element_name()));
51 ASSERT_TRUE(xml::XmlPullParser::NextChildNode(&parser, depth_b));
52 EXPECT_EQ(xml::XmlPullParser::Event::kStartElement, parser.event());
53 EXPECT_EQ(StringPiece("e"), StringPiece(parser.element_name()));
55 ASSERT_FALSE(xml::XmlPullParser::NextChildNode(&parser, depth_outer));
56 EXPECT_EQ(xml::XmlPullParser::Event::kEndDocument, parser.event());