Home
last modified time | relevance | path

Searched refs:XmlPullParser (Results 1 – 25 of 375) sorted by relevance

12345678910>>...15

/frameworks/base/tools/aapt2/
DResourceParser.h76 bool Parse(xml::XmlPullParser* parser);
86 std::optional<FlattenedXmlSubTree> CreateFlattenSubTree(xml::XmlPullParser* parser);
95 bool FlattenXmlSubtree(xml::XmlPullParser* parser, std::string* out_raw_string,
106 std::unique_ptr<Item> ParseXml(xml::XmlPullParser* parser, const uint32_t type_mask,
109 bool ParseResources(xml::XmlPullParser* parser);
110 bool ParseResource(xml::XmlPullParser* parser, ParsedResource* out_resource);
112 bool ParseItem(xml::XmlPullParser* parser, ParsedResource* out_resource, uint32_t format);
113 bool ParseString(xml::XmlPullParser* parser, ParsedResource* out_resource);
114 bool ParseMacro(xml::XmlPullParser* parser, ParsedResource* out_resource);
115 bool ParsePublic(xml::XmlPullParser* parser, ParsedResource* out_resource);
[all …]
DResourceParser.cpp249 xml::XmlPullParser* parser, std::string* out_raw_string, StyleString* out_style_string, in FlattenXmlSubtree()
266 while (depth > 0 && xml::XmlPullParser::IsGoodEvent(parser->Next())) { in FlattenXmlSubtree()
267 const xml::XmlPullParser::Event event = parser->event(); in FlattenXmlSubtree()
270 if (event == xml::XmlPullParser::Event::kStartElement in FlattenXmlSubtree()
271 || event == xml::XmlPullParser::Event::kEndElement) { in FlattenXmlSubtree()
285 case xml::XmlPullParser::Event::kText: { in FlattenXmlSubtree()
290 case xml::XmlPullParser::Event::kStartElement: { in FlattenXmlSubtree()
337 case xml::XmlPullParser::Event::kEndElement: { in FlattenXmlSubtree()
399 bool ResourceParser::Parse(xml::XmlPullParser* parser) { in Parse()
402 while (xml::XmlPullParser::NextChildNode(parser, depth)) { in Parse()
[all …]
/frameworks/base/tools/aapt2/xml/
DXmlPullParser.cpp33 XmlPullParser::XmlPullParser(InputStream* in) : in_(in), empty_(), depth_(0) { in XmlPullParser() function in aapt::xml::XmlPullParser
45 XmlPullParser::~XmlPullParser() { in ~XmlPullParser()
49 XmlPullParser::Event XmlPullParser::Next() { in Next()
104 XmlPullParser::Event XmlPullParser::event() const { in event()
108 const std::string& XmlPullParser::error() const { return error_; } in error()
110 const std::string& XmlPullParser::comment() const { in comment()
114 size_t XmlPullParser::line_number() const { in line_number()
118 size_t XmlPullParser::depth() const { return event_queue_.front().depth; } in depth()
120 const std::string& XmlPullParser::text() const { in text()
127 const std::string& XmlPullParser::namespace_prefix() const { in namespace_prefix()
[all …]
DXmlPullParser.h42 class XmlPullParser : public IPackageDeclStack {
66 static bool NextChildNode(XmlPullParser* parser, size_t start_depth);
67 static bool SkipCurrentElement(XmlPullParser* parser);
70 explicit XmlPullParser(io::InputStream* in);
71 ~XmlPullParser();
160 DISALLOW_COPY_AND_ASSIGN(XmlPullParser);
196 Maybe<android::StringPiece> FindAttribute(const XmlPullParser* parser,
204 Maybe<android::StringPiece> FindNonEmptyAttribute(const XmlPullParser* parser,
212 XmlPullParser::Event event) {
214 case XmlPullParser::Event::kBadDocument:
[all …]
DXmlPullParser_test.cpp29 using Event = ::aapt::xml::XmlPullParser::Event;
39 XmlPullParser parser(&input); in TEST()
42 ASSERT_TRUE(XmlPullParser::NextChildNode(&parser, depth_outer)); in TEST()
44 EXPECT_THAT(parser.event(), Eq(XmlPullParser::Event::kStartElement)); in TEST()
48 ASSERT_TRUE(XmlPullParser::NextChildNode(&parser, depth_a)); in TEST()
49 EXPECT_THAT(parser.event(), Eq(XmlPullParser::Event::kStartElement)); in TEST()
53 ASSERT_TRUE(XmlPullParser::NextChildNode(&parser, depth_b)); in TEST()
54 EXPECT_THAT(parser.event(), Eq(XmlPullParser::Event::kStartElement)); in TEST()
57 ASSERT_TRUE(XmlPullParser::NextChildNode(&parser, depth_b)); in TEST()
58 EXPECT_THAT(parser.event(), Eq(XmlPullParser::Event::kStartElement)); in TEST()
[all …]
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DStackOverflowXmlParser.java19 import org.xmlpull.v1.XmlPullParser;
39 XmlPullParser parser = Xml.newPullParser(); in parse()
40 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
49 private List<Entry> readFeed(XmlPullParser parser) throws XmlPullParserException, IOException { in readFeed()
52 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
53 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
54 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
85 private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException { in readEntry()
86 parser.require(XmlPullParser.START_TAG, ns, "entry"); in readEntry()
90 while (parser.next() != XmlPullParser.END_TAG) { in readEntry()
[all …]
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/
DBridgeXmlBlockParserTest.java28 import org.xmlpull.v1.XmlPullParser;
50 XmlPullParser parser = ParserFactory.create( in testXmlBlockParser()
56 assertEquals(XmlPullParser.START_DOCUMENT, parser.next()); in testXmlBlockParser()
58 assertEquals(XmlPullParser.START_TAG, parser.next()); in testXmlBlockParser()
61 assertEquals(XmlPullParser.TEXT, parser.next()); in testXmlBlockParser()
63 assertEquals(XmlPullParser.START_TAG, parser.next()); in testXmlBlockParser()
65 assertEquals(XmlPullParser.TEXT, parser.next()); in testXmlBlockParser()
66 assertEquals(XmlPullParser.END_TAG, parser.next()); in testXmlBlockParser()
68 assertEquals(XmlPullParser.TEXT, parser.next()); in testXmlBlockParser()
70 assertEquals(XmlPullParser.START_TAG, parser.next()); in testXmlBlockParser()
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/serialization/
DKeyChainSnapshotDeserializer.java51 import org.xmlpull.v1.XmlPullParser;
90 parser.require(XmlPullParser.START_TAG, NAMESPACE, TAG_KEY_CHAIN_SNAPSHOT); in deserializeInternal()
93 while (parser.next() != XmlPullParser.END_TAG) { in deserializeInternal()
94 if (parser.getEventType() != XmlPullParser.START_TAG) { in deserializeInternal()
150 parser.require(XmlPullParser.END_TAG, NAMESPACE, TAG_KEY_CHAIN_SNAPSHOT); in deserializeInternal()
160 parser.require(XmlPullParser.START_TAG, NAMESPACE, TAG_APPLICATION_KEYS); in readWrappedApplicationKeys()
162 while (parser.next() != XmlPullParser.END_TAG) { in readWrappedApplicationKeys()
163 if (parser.getEventType() != XmlPullParser.START_TAG) { in readWrappedApplicationKeys()
168 parser.require(XmlPullParser.END_TAG, NAMESPACE, TAG_APPLICATION_KEYS); in readWrappedApplicationKeys()
174 parser.require(XmlPullParser.START_TAG, NAMESPACE, TAG_APPLICATION_KEY); in readWrappedApplicationKey()
[all …]
/frameworks/base/core/java/android/util/
DXml.java36 import org.xmlpull.v1.XmlPullParser;
115 public static XmlPullParser newPullParser() { in newPullParser()
117 XmlPullParser parser = XmlObjectFactory.newXmlPullParser(); in newPullParser()
118 parser.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true); in newPullParser()
119 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); in newPullParser()
266 public static void copy(@NonNull XmlPullParser in, @NonNull XmlSerializer out) in copy()
270 if (in.getEventType() == XmlPullParser.START_DOCUMENT) { in copy()
277 case XmlPullParser.START_DOCUMENT: in copy()
280 case XmlPullParser.END_DOCUMENT: in copy()
283 case XmlPullParser.START_TAG: in copy()
[all …]
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/
DVendorConfig.java29 import org.xmlpull.v1.XmlPullParser;
129 private static @NonNull String readText(XmlPullParser parser) in readText()
133 if (parser.next() == XmlPullParser.TEXT) { in readText()
153 @NonNull XmlPullParser parser, @NonNull String tagName, boolean resolveReferences) in readSimpleTag()
155 parser.require(XmlPullParser.START_TAG, null, tagName); in readSimpleTag()
157 parser.require(XmlPullParser.END_TAG, null, tagName); in readSimpleTag()
181 private static @NonNull <T> ArrayList<T> readTagList(@NonNull XmlPullParser parser, in readTagList()
186 parser.require(XmlPullParser.START_TAG, null, tagName); in readTagList()
187 while (parser.next() != XmlPullParser.END_TAG) { in readTagList()
188 if (parser.getEventType() != XmlPullParser.START_TAG) { in readTagList()
[all …]
/frameworks/base/telephony/java/com/android/internal/telephony/util/
DXmlUtils.java19 import org.xmlpull.v1.XmlPullParser;
31 public static void beginDocument(XmlPullParser parser, String firstElementName) in beginDocument()
51 public static void nextElement(XmlPullParser parser) in nextElement()
62 public static boolean nextElementWithin(XmlPullParser parser, int outerDepth) in nextElementWithin()
66 if (type == XmlPullParser.END_DOCUMENT in nextElementWithin()
67 || (type == XmlPullParser.END_TAG && parser.getDepth() == outerDepth)) { in nextElementWithin()
70 if (type == XmlPullParser.START_TAG && parser.getDepth() == outerDepth + 1) { in nextElementWithin()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/items/
DSimpleInflater.java27 import org.xmlpull.v1.XmlPullParser;
85 public T inflate(XmlPullParser parser) { in inflate()
92 while ((type = parser.next()) != XmlPullParser.START_TAG in inflate()
93 && type != XmlPullParser.END_DOCUMENT) { in inflate()
97 if (type != XmlPullParser.START_TAG) { in inflate()
142 private void rInflate(XmlPullParser parser, T parent, final AttributeSet attrs) in rInflate()
147 while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) in rInflate()
148 && type != XmlPullParser.END_DOCUMENT) { in rInflate()
150 if (type != XmlPullParser.START_TAG) { in rInflate()
184 protected boolean onInterceptCreateItem(XmlPullParser parser, T parent, AttributeSet attrs) in onInterceptCreateItem()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DParserFactory.java21 import org.xmlpull.v1.XmlPullParser;
47 public static XmlPullParser create(@NonNull String filePath) in create()
53 public static XmlPullParser create(@NonNull String filePath, boolean isLayout) in create()
55 XmlPullParser parser = sParserFactory.createXmlParserForFile(filePath); in create()
67 public static XmlPullParser create(@NonNull InputStream stream, @Nullable String name) in create()
69 XmlPullParser parser = create(); in create()
78 public static XmlPullParser create() throws XmlPullParserException { in create()
82 XmlPullParser parser = sParserFactory.createXmlParser(); in create()
83 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); in create()
/frameworks/base/core/java/android/content/res/
DFontResourcesParser.java27 import org.xmlpull.v1.XmlPullParser;
140 public static @Nullable FamilyResourceEntry parse(XmlPullParser parser, Resources resources) in parse()
143 while ((type=parser.next()) != XmlPullParser.START_TAG in parse()
144 && type != XmlPullParser.END_DOCUMENT) { in parse()
148 if (type != XmlPullParser.START_TAG) { in parse()
154 private static @Nullable FamilyResourceEntry readFamilies(XmlPullParser parser, in readFamilies()
156 parser.require(XmlPullParser.START_TAG, null, "font-family"); in readFamilies()
168 private static @Nullable FamilyResourceEntry readFamily(XmlPullParser parser, in readFamily()
180 while (parser.next() != XmlPullParser.END_TAG) { in readFamily()
212 while (parser.next() != XmlPullParser.END_TAG) { in readFamily()
[all …]
/frameworks/base/graphics/java/android/graphics/
DFontListParser.java30 import org.xmlpull.v1.XmlPullParser;
73 XmlPullParser parser = Xml.newPullParser(); in parse()
115 XmlPullParser parser = Xml.newPullParser(); in parse()
124 @NonNull XmlPullParser parser, in readFamilies()
138 parser.require(XmlPullParser.START_TAG, null, "familyset"); in readFamilies()
140 if (parser.getEventType() != XmlPullParser.START_TAG) continue; in readFamilies()
165 private static boolean keepReading(XmlPullParser parser) in keepReading()
168 return next != XmlPullParser.END_TAG && next != XmlPullParser.END_DOCUMENT; in keepReading()
180 public static @Nullable FontConfig.FontFamily readFamily(XmlPullParser parser, String fontDir, in readFamily()
188 if (parser.getEventType() != XmlPullParser.START_TAG) continue; in readFamily()
[all …]
/frameworks/base/core/java/android/app/
DAliasActivity.java19 import org.xmlpull.v1.XmlPullParser;
90 private Intent parseAlias(XmlPullParser parser) in parseAlias()
97 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in parseAlias()
98 && type != XmlPullParser.START_TAG) { in parseAlias()
109 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in parseAlias()
110 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in parseAlias()
111 if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) { in parseAlias()
/frameworks/opt/net/ims/src/java/com/android/ims/rcs/uce/presence/pidfparser/pidf/
DPresence.java25 import org.xmlpull.v1.XmlPullParser;
112 serializer.attribute(XmlPullParser.NO_NAMESPACE, ATTRIBUTE_NAME_ENTITY, mEntity); in serialize()
127 public void parse(XmlPullParser parser) throws IOException, XmlPullParserException { in parse()
135 mEntity = parser.getAttributeValue(XmlPullParser.NO_NAMESPACE, ATTRIBUTE_NAME_ENTITY); in parse()
140 while(!(eventType == XmlPullParser.END_TAG in parse()
144 if (eventType == XmlPullParser.START_TAG) { in parse()
161 if (eventType == XmlPullParser.END_DOCUMENT) { in parse()
168 return (eventType == XmlPullParser.START_TAG && Tuple.ELEMENT_NAME.equals(name)) ? in isTupleElement()
173 return (eventType == XmlPullParser.START_TAG && Note.ELEMENT_NAME.equals(name)) ? in isNoteElement()
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsXmlV1.java27 import org.xmlpull.v1.XmlPullParser;
84 private static void loadUsageStats(XmlPullParser parser, IntervalStats statsOut) in loadUsageStats()
129 while ((eventCode = parser.next()) != XmlPullParser.END_DOCUMENT) { in loadUsageStats()
131 if (eventCode == XmlPullParser.END_TAG && tag.equals(PACKAGE_TAG)) { in loadUsageStats()
134 if (eventCode != XmlPullParser.START_TAG) { in loadUsageStats()
144 private static void loadCountAndTime(XmlPullParser parser, in loadCountAndTime()
153 XmlPullParser parser, UsageStats usageStats, String action) in loadChooserCounts()
167 while ((eventCode = parser.next()) != XmlPullParser.END_DOCUMENT) { in loadChooserCounts()
169 if (eventCode == XmlPullParser.END_TAG && tag.equals(CHOOSER_COUNT_TAG)) { in loadChooserCounts()
172 if (eventCode != XmlPullParser.START_TAG) { in loadChooserCounts()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DSELinuxMMAC.java33 import org.xmlpull.v1.XmlPullParser;
170 XmlPullParser parser = Xml.newPullParser(); in readInstallPolicy()
181 parser.require(XmlPullParser.START_TAG, null, "policy"); in readInstallPolicy()
183 while (parser.next() != XmlPullParser.END_TAG) { in readInstallPolicy()
184 if (parser.getEventType() != XmlPullParser.START_TAG) { in readInstallPolicy()
251 private static Policy readSignerOrThrow(XmlPullParser parser) throws IOException, in readSignerOrThrow()
254 parser.require(XmlPullParser.START_TAG, null, "signer"); in readSignerOrThrow()
264 while (parser.next() != XmlPullParser.END_TAG) { in readSignerOrThrow()
265 if (parser.getEventType() != XmlPullParser.START_TAG) { in readSignerOrThrow()
302 private static void readPackageOrThrow(XmlPullParser parser, Policy.PolicyBuilder pb) throws in readPackageOrThrow()
[all …]
/frameworks/opt/net/ims/src/java/com/android/ims/rcs/uce/presence/pidfparser/
DElementBase.java20 import org.xmlpull.v1.XmlPullParser;
57 public abstract void parse(XmlPullParser parser) throws IOException, XmlPullParserException; in parse()
68 protected void moveToElementEndTag(XmlPullParser parser, int type) in moveToElementEndTag()
73 while(!(eventType == XmlPullParser.END_TAG in moveToElementEndTag()
79 if (eventType == XmlPullParser.END_DOCUMENT) { in moveToElementEndTag()
/frameworks/base/services/core/java/com/android/server/tv/tunerresourcemanager/
DUseCasePriorityHints.java28 import org.xmlpull.v1.XmlPullParser;
141 parser.require(XmlPullParser.START_TAG, NS, "config"); in readUseCase()
142 while (parser.next() != XmlPullParser.END_TAG) { in readUseCase()
143 if (parser.getEventType() != XmlPullParser.START_TAG) { in readUseCase()
152 parser.require(XmlPullParser.END_TAG, NS, name); in readUseCase()
163 parser.require(XmlPullParser.END_TAG, NS, name); in readUseCase()
171 parser.require(XmlPullParser.END_TAG, NS, name); in readUseCase()
179 if (parser.getEventType() != XmlPullParser.START_TAG) { in skip()
185 case XmlPullParser.END_TAG: in skip()
188 case XmlPullParser.START_TAG: in skip()
/frameworks/base/core/java/android/view/animation/
DAnimationUtils.java32 import org.xmlpull.v1.XmlPullParser;
155 private static Animation createAnimationFromXml(Context c, XmlPullParser parser) in createAnimationFromXml()
162 private static Animation createAnimationFromXml(Context c, XmlPullParser parser, in createAnimationFromXml()
171 while (((type=parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) in createAnimationFromXml()
172 && type != XmlPullParser.END_DOCUMENT) { in createAnimationFromXml()
174 if (type != XmlPullParser.START_TAG) { in createAnimationFromXml()
237 XmlPullParser parser) throws XmlPullParserException, IOException { in createLayoutAnimationFromXml()
243 XmlPullParser parser, AttributeSet attrs) throws XmlPullParserException, IOException { in createLayoutAnimationFromXml()
250 while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) in createLayoutAnimationFromXml()
251 && type != XmlPullParser.END_DOCUMENT) { in createLayoutAnimationFromXml()
[all …]
/frameworks/base/services/core/java/com/android/server/slice/
DSliceFullAccessList.java26 import org.xmlpull.v1.XmlPullParser;
101 public void readXml(XmlPullParser parser) throws XmlPullParserException, IOException { in readXml()
112 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT) { in readXml()
114 if (type == XmlPullParser.END_TAG in readXml()
118 if (type == XmlPullParser.START_TAG) { in readXml()
122 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT) { in readXml()
124 if (type == XmlPullParser.END_TAG in readXml()
128 if (type == XmlPullParser.START_TAG) { in readXml()
/frameworks/base/services/core/java/com/android/server/net/watchlist/
DWatchlistConfig.java29 import org.xmlpull.v1.XmlPullParser;
117 XmlPullParser parser = Xml.newPullParser(); in reloadConfig()
120 parser.require(XmlPullParser.START_TAG, null, XmlTags.WATCHLIST_CONFIG); in reloadConfig()
121 while (parser.nextTag() == XmlPullParser.START_TAG) { in reloadConfig()
141 parser.require(XmlPullParser.END_TAG, null, XmlTags.WATCHLIST_CONFIG); in reloadConfig()
153 private void parseHashes(XmlPullParser parser, String tagName, List<byte[]> hashList) in parseHashes()
155 parser.require(XmlPullParser.START_TAG, null, tagName); in parseHashes()
157 while (parser.nextTag() == XmlPullParser.START_TAG) { in parseHashes()
158 parser.require(XmlPullParser.START_TAG, null, XmlTags.HASH); in parseHashes()
160 parser.require(XmlPullParser.END_TAG, null, XmlTags.HASH); in parseHashes()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DBinaryXmlSerializer.java19 import static org.xmlpull.v1.XmlPullParser.CDSECT;
20 import static org.xmlpull.v1.XmlPullParser.COMMENT;
21 import static org.xmlpull.v1.XmlPullParser.DOCDECL;
22 import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
23 import static org.xmlpull.v1.XmlPullParser.END_TAG;
24 import static org.xmlpull.v1.XmlPullParser.ENTITY_REF;
25 import static org.xmlpull.v1.XmlPullParser.IGNORABLE_WHITESPACE;
26 import static org.xmlpull.v1.XmlPullParser.PROCESSING_INSTRUCTION;
27 import static org.xmlpull.v1.XmlPullParser.START_DOCUMENT;
28 import static org.xmlpull.v1.XmlPullParser.START_TAG;
[all …]

12345678910>>...15