Home
last modified time | relevance | path

Searched refs:document (Results 1 – 25 of 30) sorted by relevance

12

/libcore/luni/src/test/java/libcore/xml/
DDomSerializationTest.java42 Document document = documentBuilder.newDocument(); in testWriteDocument() local
43 Element foo = document.createElement("foo"); in testWriteDocument()
44 Attr quux = document.createAttribute("quux"); in testWriteDocument()
47 foo.appendChild(document.createElement("bar")); in testWriteDocument()
48 foo.appendChild(document.createElement("baz")); in testWriteDocument()
49 document.appendChild(foo); in testWriteDocument()
50 assertXmlEquals("<foo quux=\"abc\"><bar/><baz/></foo>", document); in testWriteDocument()
54 Document document = documentBuilder.newDocument(); in testWriteSpecialCharactersInText() local
55 Element foo = document.createElement("foo"); in testWriteSpecialCharactersInText()
56 foo.appendChild(document.createTextNode("5'8\", 5 < 6 & 7 > 3!")); in testWriteSpecialCharactersInText()
[all …]
DNormalizeTest.java56 private Document document; field in NormalizeTest
65 document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); in setUp()
66 domConfiguration = document.getDomConfig(); in setUp()
343 document.getDocumentElement().normalize(); in testCdataSectionsNotHonoredByNodeNormalize()
344 assertEquals(xml, domToString(document)); in testCdataSectionsNotHonoredByNodeNormalize()
348 document.getDocumentElement().normalize(); in testCdataSectionsNotHonoredByNodeNormalize()
349 assertEquals(xml, domToString(document)); in testCdataSectionsNotHonoredByNodeNormalize()
356 document.normalizeDocument(); in testCdataSectionsHonoredByDocumentNormalize()
357 assertEquals(xml, domToString(document)); in testCdataSectionsHonoredByDocumentNormalize()
361 document.normalizeDocument(); in testCdataSectionsHonoredByDocumentNormalize()
[all …]
DDomTest.java98 private Document document; field in DomTest
133 document = builder.parse(new InputSource(new StringReader(xml))); in setUp()
136 doctype = document.getDoctype(); in setUp()
145 menu = document.getDocumentElement(); in setUp()
177 allNodes.addAll(Arrays.asList(document, doctype, menu, item, itemXmlns, in setUp()
208 assertEquals(null, document.lookupNamespaceURI("a")); in testLookupNamespaceURIByPrefix()
233 assertEquals(null, document.lookupNamespaceURI(null)); in testLookupNamespaceURIWithNullPrefix()
271 assertEquals(null, document.lookupPrefix("http://addons")); in testLookupPrefixWithShadowedUri()
315 assertEquals(null, document.lookupPrefix("http://usda")); in testLookupPrefixWithShadowingUri()
347 assertFalse(document.isDefaultNamespace("http://food")); in testIsDefaultNamespace()
[all …]
DNodeTest.java42 Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bis); in test_getNextSibling() local
43 Node root = document.getDocumentElement(); in test_getNextSibling()
50 Document document = builder.parse(file); in testGetBaseUri() local
52 assertFileUriEquals(file, document.getBaseURI()); in testGetBaseUri()
54 Element documentElement = document.getDocumentElement(); in testGetBaseUri()
DSimpleBuilderTest.java58 Document document = builder.parse(getClass().getResourceAsStream( in testGoodFile1() local
61 Element root = document.getDocumentElement(); in testGoodFile1()
90 list = document.getChildNodes(); in testGoodFile1()
111 Document document = builder.parse(getClass().getResourceAsStream( in testGoodFile2() local
114 Element root = document.getDocumentElement(); in testGoodFile2()
DJaxenXPathTestSuite.java89 for (Element document : elementsOf(tests.getElementsByTagName("document"))) { in suite()
90 String url = document.getAttribute("url"); in suite()
92 for (final Element context : elementsOf(document.getElementsByTagName("context"))) { in suite()
/libcore/luni/src/main/java/org/apache/harmony/xml/parsers/
DDocumentBuilderImpl.java101 DocumentImpl document = new DocumentImpl( in parse() local
103 document.setDocumentURI(systemId); in parse()
128 parse(parser, document, document, XmlPullParser.END_DOCUMENT); in parse()
158 return document; in parse()
178 private void parse(KXmlParser parser, DocumentImpl document, Node node, in parse() argument
202 node.appendChild(document.createProcessingInstruction(target, in parse()
208 document.appendChild(new DocumentTypeImpl(document, name, publicId, systemId)); in parse()
216 node.appendChild(document.createComment(parser.getText())); in parse()
224 if (!ignoreElementContentWhitespace && document != node) { in parse()
225 appendText(document, node, token, parser.getText()); in parse()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DCDATASectionImpl.java34 public CDATASectionImpl(DocumentImpl document, String data) { in CDATASectionImpl() argument
35 super(document, data); in CDATASectionImpl()
59 parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); in split()
61 parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); in split()
82 TextImpl replacement = new TextImpl(document, getData()); in replaceWithText()
DInnerNodeImpl.java47 protected InnerNodeImpl(DocumentImpl document) { in InnerNodeImpl() argument
48 super(document); in InnerNodeImpl()
92 if (refChildImpl.document != document) { in insertBefore()
117 if (toInsert.document != null && document != null && toInsert.document != document) { in insertChildAt()
177 if (oldChildImpl.document != document) { in removeChild()
DAttrImpl.java48 AttrImpl(DocumentImpl document, String namespaceURI, String qualifiedName) { in AttrImpl() argument
49 super(document); in AttrImpl()
53 AttrImpl(DocumentImpl document, String name) { in AttrImpl() argument
54 super(document); in AttrImpl()
DElementImpl.java53 ElementImpl(DocumentImpl document, String namespaceURI, String qualifiedName) { in ElementImpl() argument
54 super(document); in ElementImpl()
58 ElementImpl(DocumentImpl document, String name) { in ElementImpl() argument
59 super(document); in ElementImpl()
254 attr = document.createAttribute(name); in setAttribute()
266 attr = document.createAttributeNS(namespaceURI, qualifiedName); in setAttributeNS()
276 if (newAttrImpl.document != this.document) { in setAttributeNode()
301 if (newAttrImpl.document != this.document) { in setAttributeNodeNS()
DDocumentFragmentImpl.java35 DocumentFragmentImpl(DocumentImpl document) { in DocumentFragmentImpl() argument
36 super(document); in DocumentFragmentImpl()
DCommentImpl.java34 CommentImpl(DocumentImpl document, String data) { in CommentImpl() argument
35 super(document, data); in CommentImpl()
DEntityReferenceImpl.java36 EntityReferenceImpl(DocumentImpl document, String name) { in EntityReferenceImpl() argument
37 super(document); in EntityReferenceImpl()
DNotationImpl.java40 NotationImpl(DocumentImpl document, String notationName, String publicID, in NotationImpl() argument
42 super(document); in NotationImpl()
DLeafNodeImpl.java41 LeafNodeImpl(DocumentImpl document) { in LeafNodeImpl() argument
42 super(document); in LeafNodeImpl()
DProcessingInstructionImpl.java40 ProcessingInstructionImpl(DocumentImpl document, String target, String data) { in ProcessingInstructionImpl() argument
41 super(document); in ProcessingInstructionImpl()
DEntityImpl.java40 EntityImpl(DocumentImpl document, String notationName, String publicID, in EntityImpl() argument
42 super(document); in EntityImpl()
DTextImpl.java35 public TextImpl(DocumentImpl document, String data) { in TextImpl() argument
36 super(document, data); in TextImpl()
50 Text newText = document.createTextNode( in splitText()
DNodeImpl.java68 DocumentImpl document; field in NodeImpl
70 NodeImpl(DocumentImpl document) { in NodeImpl() argument
71 this.document = document; in NodeImpl()
79 return document.cloneOrImportNode(UserDataHandler.NODE_CLONED, this, deep); in cloneNode()
121 return document == this ? null : document; in getOwnerDocument()
421 appendChild(document.createTextNode(textContent)); in setTextContent()
702 Map<String, UserData> map = document.getUserDataMap(this); in setUserData()
713 Map<String, UserData> map = document.getUserDataMapForRead(this); in getUserData()
DCharacterDataImpl.java37 CharacterDataImpl(DocumentImpl document, String data) { in CharacterDataImpl() argument
38 super(document); in CharacterDataImpl()
DDocumentTypeImpl.java42 public DocumentTypeImpl(DocumentImpl document, String qualifiedName, in DocumentTypeImpl() argument
44 super(document); in DocumentTypeImpl()
DDocumentImpl.java78 this.document = this; in DocumentImpl()
291 Map<String, UserData> userData = node.document.getUserDataMapForRead(node); in changeDocumentToThis()
295 node.document = this; in changeDocumentToThis()
535 if (srcImpl.document == null) { in notifyUserDataHandlers()
540 : srcImpl.document.getUserDataMapForRead(srcImpl).entrySet()) { in notifyUserDataHandlers()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DDocumentBuilderFactoryTest.java384 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ() local
389 goThroughDocument((Node) document, ""); in test_setCoalescingZ()
412 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ() local
417 goThroughDocument((Node) document, ""); in test_setCoalescingZ()
447 Document document = parser.parse(getClass().getResourceAsStream( in test_setExpandEntityReferencesZ() local
452 assertNotNull(document); in test_setExpandEntityReferencesZ()
470 Document document = parser.parse(getClass().getResourceAsStream( in test_setExpandEntityReferencesZ() local
475 assertNotNull(document); in test_setExpandEntityReferencesZ()
545 Document document = parser.parse(getClass().getResourceAsStream( in test_setIgnoringCommentsZ() local
548 goThroughDocument((Node) document, ""); in test_setIgnoringCommentsZ()
[all …]
/libcore/benchmarks/src/benchmarks/
DXmlParseBenchmark.java109 Document document = documentBuilder.parse(inputStream); in timeDom() local
110 elementCount += countDomElements(document.getDocumentElement()); in timeDom()

12