Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 32) sorted by relevance

12

/libcore/luni/src/test/java/libcore/xml/
DPullParserTest.java28 XmlPullParser parser = newPullParser(); in testAttributeNoValueWithRelaxed() local
29 parser.setFeature("http://xmlpull.org/v1/doc/features.html#relaxed", true); in testAttributeNoValueWithRelaxed()
30 parser.setInput(new StringReader("<input checked></input>")); in testAttributeNoValueWithRelaxed()
31 assertEquals(XmlPullParser.START_TAG, parser.next()); in testAttributeNoValueWithRelaxed()
32 assertEquals("input", parser.getName()); in testAttributeNoValueWithRelaxed()
33 assertEquals("checked", parser.getAttributeName(0)); in testAttributeNoValueWithRelaxed()
34 assertEquals("checked", parser.getAttributeValue(0)); in testAttributeNoValueWithRelaxed()
38 XmlPullParser parser = newPullParser(); in testAttributeUnquotedValueWithRelaxed() local
39 parser.setFeature("http://xmlpull.org/v1/doc/features.html#relaxed", true); in testAttributeUnquotedValueWithRelaxed()
40 parser.setInput(new StringReader("<input checked=true></input>")); in testAttributeUnquotedValueWithRelaxed()
[all …]
DPullParserDtdTest.java40 XmlPullParser parser = newPullParser(xml); in testDeclaringParameterEntities() local
41 while (parser.next() != XmlPullParser.END_DOCUMENT) { in testDeclaringParameterEntities()
63 XmlPullParser parser = newPullParser(xml); in testGeneralAndParameterEntityWithTheSameName() local
64 assertEquals(XmlPullParser.START_TAG, parser.next()); in testGeneralAndParameterEntityWithTheSameName()
65 assertEquals(XmlPullParser.TEXT, parser.next()); in testGeneralAndParameterEntityWithTheSameName()
66 assertEquals("aaa", parser.getText()); in testGeneralAndParameterEntityWithTheSameName()
67 assertEquals(XmlPullParser.END_TAG, parser.next()); in testGeneralAndParameterEntityWithTheSameName()
68 assertEquals(XmlPullParser.END_DOCUMENT, parser.next()); in testGeneralAndParameterEntityWithTheSameName()
75 XmlPullParser parser = newPullParser(xml); in testInternalEntities() local
76 assertEquals(XmlPullParser.START_TAG, parser.next()); in testInternalEntities()
[all …]
DSimpleParserTest.java39 private SAXParser parser; field in SimpleParserTest
60 parser = factory.newSAXParser(); in setUp()
61 parser.getXMLReader().setContentHandler(contentHandler); in setUp()
76 parser = null; in tearDown()
152 SAXParser parser = factory.newSAXParser(); in testWorkingFile1() local
153 parser.getXMLReader().setContentHandler(contentHandler); in testWorkingFile1()
155 parser.parse(getClass().getResourceAsStream("/SimpleParserTest.xml"), in testWorkingFile1()
179 SAXParser parser = factory.newSAXParser(); in testWorkingFile2() local
180 parser.getXMLReader().setContentHandler(contentHandler); in testWorkingFile2()
181 parser.parse(getClass().getResourceAsStream("/SimpleParserTest.xml"), in testWorkingFile2()
[all …]
DSaxTest.java187 SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); in testDisableExternalEntities() local
188 XMLReader reader = parser.getXMLReader(); in testDisableExternalEntities()
205 SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); in parse() local
206 XMLReader reader = parser.getXMLReader(); in parse()
DXmlPullParserFactoryTest.java36 XmlPullParser parser = factory.newPullParser(); in testDefaultNewInstance() local
39 assertNotNull(parser); in testDefaultNewInstance()
41 assertTrue(parser instanceof KXmlParser); in testDefaultNewInstance()
/libcore/dom/src/test/java/org/w3c/domts/
DLSDocumentBuilderFactory.java32 private final Object parser; field in LSDocumentBuilderFactory
57 Object parser) throws in applySetting() argument
66 public abstract boolean hasSetting(Object parser); in hasSetting() argument
93 public void applySetting(DocumentBuilderSetting setting, Object parser) throws in applySetting() argument
103 public boolean hasSetting(Object parser) { in hasSetting() argument
131 Object parser, in setParameter() argument
136 Method domConfigMethod = parser.getClass().getMethod("getDomConfig", in setParameter()
138 Object domConfig = domConfigMethod.invoke(parser, new Object[0]); in setParameter()
152 protected static Object getParameter(Object parser, in getParameter() argument
154 Method domConfigMethod = parser.getClass().getMethod("getDomConfig", in getParameter()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/parsers/
DDocumentBuilderImpl.java105 KXmlParser parser = new KXmlParser(); in parse() local
107 parser.keepNamespaceAttributes(); in parse()
108 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, namespaceAware); in parse()
111 parser.setInput(source.getByteStream(), inputEncoding); in parse()
113 parser.setInput(source.getCharacterStream()); in parse()
119 parser.setInput(urlConnection.getInputStream(), inputEncoding); in parse()
124 if (parser.nextToken() == XmlPullParser.END_DOCUMENT) { in parse()
128 parse(parser, document, document, XmlPullParser.END_DOCUMENT); in parse()
130 parser.require(XmlPullParser.END_DOCUMENT, null, null); in parse()
155 IoUtils.closeQuietly(parser); in parse()
[all …]
DSAXParserImpl.java38 private Parser parser; field in SAXParserImpl
72 if (parser == null) { in getParser()
73 parser = new XMLReaderAdapter(reader); in getParser()
76 return parser; in getParser()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DSAXParserTest.java121 SAXParser parser; field in SAXParserTest
145 SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); in initFiles() local
146 validating = parser.isValidating(); in initFiles()
190 parser = spf.newSAXParser(); in setUp()
191 assertNotNull(parser); in setUp()
315 parser.parse(list_wf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
322 parser.parse(list_nwf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
331 parser.parse((File) null, dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
338 parser.parse(list_wf[0], (DefaultHandler) null); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
350 parser.parse(list_wf[i], dh); in testParseFileHandlerBase()
[all …]
DDocumentBuilderFactoryTest.java377 DocumentBuilder parser = null; in test_setCoalescingZ() local
380 parser = dbf.newDocumentBuilder(); in test_setCoalescingZ()
382 parser.setErrorHandler(errorHandler); in test_setCoalescingZ()
384 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ()
395 parser.setErrorHandler(null); in test_setCoalescingZ()
408 parser = dbf.newDocumentBuilder(); in test_setCoalescingZ()
410 parser.setErrorHandler(errorHandler); in test_setCoalescingZ()
412 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ()
425 parser.setErrorHandler(null); in test_setCoalescingZ()
440 DocumentBuilder parser = null; in test_setExpandEntityReferencesZ() local
[all …]
/libcore/xml/src/main/java/org/xmlpull/v1/
DXmlPullParserException.java36 public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) { in XmlPullParserException() argument
38 + (parser == null ? "" : "(position:"+parser.getPositionDescription()+") ") in XmlPullParserException()
41 if (parser != null) { in XmlPullParserException()
42 this.row = parser.getLineNumber(); in XmlPullParserException()
43 this.column = parser.getColumnNumber(); in XmlPullParserException()
/libcore/tools/upstream/
Dupstream-diff81 parser = argparse.ArgumentParser(
90 parser.add_argument('-r', '--repositories', default='ojluni,expected',
93 parser.add_argument('-d', '--diff', default='meld',
95 parser.add_argument('rel_path', nargs="+",
98 args = parser.parse_args()
102 parser.print_help()
/libcore/luni/src/main/native/
Dorg_apache_harmony_xml_ExpatParser.cpp204 static ParsingContext* toParsingContext(XML_Parser parser) { in toParsingContext() argument
205 return reinterpret_cast<ParsingContext*>(XML_GetUserData(parser)); in toParsingContext()
212 static jlong fromXMLParser(XML_Parser parser) { in fromXMLParser() argument
213 return reinterpret_cast<uintptr_t>(parser); in fromXMLParser()
883 static int handleExternalEntity(XML_Parser parser, const char* context, in handleExternalEntity() argument
885 ParsingContext* parsingContext = toParsingContext(parser); in handleExternalEntity()
989 XML_Parser parser; in ExpatParser_initialize() local
996 parser = XML_ParserCreateNS(encoding.c_str(), '|'); in ExpatParser_initialize()
998 parser = XML_ParserCreate(encoding.c_str()); in ExpatParser_initialize()
1001 if (parser != NULL) { in ExpatParser_initialize()
[all …]
/libcore/luni/src/main/java/org/xml/sax/helpers/
DParserAdapter.java122 public ParserAdapter (Parser parser) in ParserAdapter() argument
124 setup(parser); in ParserAdapter()
136 private void setup (Parser parser) in setup() argument
138 if (parser == null) { in setup()
142 this.parser = parser; in setup()
405 parser.parse(input); in parse()
716 parser.setEntityResolver(entityResolver); in setupParser()
719 parser.setDTDHandler(dtdHandler); in setupParser()
722 parser.setErrorHandler(errorHandler); in setupParser()
724 parser.setDocumentHandler(this); in setupParser()
[all …]
/libcore/luni/src/main/java/javax/xml/parsers/
DSAXParser.java352 Parser parser = this.getParser(); in parse() local
354 parser.setDocumentHandler(hb); in parse()
355 parser.setEntityResolver(hb); in parse()
356 parser.setErrorHandler(hb); in parse()
357 parser.setDTDHandler(hb); in parse()
359 parser.parse(is); in parse()
/libcore/benchmarks/src/benchmarks/regression/
DXmlEntitiesBenchmark.java59 XmlPullParser parser = xmlPullParserFactory.newPullParser(); in timeXmlParser() local
60 parser.setInput(new StringReader(xml)); in timeXmlParser()
61 while (parser.next() != XmlPullParser.END_DOCUMENT) { in timeXmlParser()
/libcore/tools/docs/crypto/
Dupdate_crypto_support.py245 parser = argparse.ArgumentParser(description='Update JSON support file')
246 parser.add_argument('--api_level',
250 parser.add_argument('--rewrite_file',
254 parser.add_argument('file',
256 args = parser.parse_args()
Dformat_supported_algorithm_table.py51 parser = argparse.ArgumentParser(description='Output algorithm support HTML tables')
52 parser.add_argument('--for_javadoc',
55 parser.add_argument('--category',
58 parser.add_argument('file',
60 args = parser.parse_args()
/libcore/ojluni/src/main/java/java/lang/reflect/
DExecutable.java701 GenericSignatureParser parser = in getMethodOrConstructorGenericInfoInternal() local
704 parser.parseForMethod(this, signatureAttribute, exceptionTypes); in getMethodOrConstructorGenericInfoInternal()
706 parser.parseForConstructor(this, signatureAttribute, exceptionTypes); in getMethodOrConstructorGenericInfoInternal()
708 return new GenericInfo(parser.exceptionTypes, parser.parameterTypes, in getMethodOrConstructorGenericInfoInternal()
709 parser.returnType, parser.formalTypeParameters); in getMethodOrConstructorGenericInfoInternal()
DField.java181 GenericSignatureParser parser = new GenericSignatureParser(cl); in getGenericType() local
182 parser.parseForField(declaringClass, signatureAttribute); in getGenericType()
183 Type genericType = parser.fieldType; in getGenericType()
/libcore/dom/src/test/resources/META-INF/
DMANIFEST.MF3 ercesImpl.jar xerces.jar xml4j.jar xmlparserv2.jar crimson.jar parser
5 ar crimson-parser.jar avalon-run.jar
/libcore/luni/src/main/java/org/apache/harmony/xml/
DExpatReader.java310 ExpatParser parser = new ExpatParser( in parse() local
317 parser.parseDocument(in); in parse()
322 ExpatParser parser = in parse() local
324 parser.parseDocument(in); in parse()
/libcore/ojluni/src/main/java/java/text/
DMergeCollation.java178 PatternEntry.Parser parser = new PatternEntry.Parser(pattern); in addPattern()
180 PatternEntry entry = parser.next(); in addPattern()
183 entry = parser.next(); in addPattern()
/libcore/ojluni/src/main/java/java/lang/
DClass.java808 GenericSignatureParser parser = new GenericSignatureParser(getClassLoader()); in getTypeParameters() local
809 parser.parseForClass(this, annotationSignature); in getTypeParameters()
810 return parser.formalTypeParameters; in getTypeParameters()
874 GenericSignatureParser parser = new GenericSignatureParser(getClassLoader()); in getGenericSuperclass() local
875 parser.parseForClass(this, annotationSignature); in getGenericSuperclass()
876 genericSuperclass = parser.superclassType; in getGenericSuperclass()
1037 GenericSignatureParser parser = new GenericSignatureParser(getClassLoader()); in getGenericInterfaces() local
1038 parser.parseForClass(this, annotationSignature); in getGenericInterfaces()
1039 result = Types.getTypeArray(parser.interfaceTypes, false); in getGenericInterfaces()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/
DParserAdapterTest.java62 private Parser parser = new MockParser(logger); field in ParserAdapterTest
64 private ParserAdapter adapter = new ParserAdapter(parser);
99 ParserAdapter adapter = new ParserAdapter(parser); in testParserAdapterParser()

12