DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
public boolean isParsedEntity(EntityReference entityreference) { String s = entityreference.getNodeName(); Document document = entityreference.getOwnerDocument(); DocumentType documenttype = document.getDoctype(); if(documenttype == null) return false; NamedNodeMap namednodemap = documenttype.getEntities(); Entity entity = (Entity)namednodemap.getNamedItem(s); if(entity == null) return false; else return entity.getNotationName() == null; }
public boolean isParsedEntity (final EntityReference entityRef) { final String name = entityRef.getNodeName (); final Document doc = entityRef.getOwnerDocument (); final DocumentType doctype = doc.getDoctype (); if (doctype == null) return false; final NamedNodeMap entities = doctype.getEntities (); final Entity entity = (Entity) entities.getNamedItem (name); if (entity == null) return false; return entity.getNotationName () == null; } }
public boolean isParsedEntity(EntityReference entityRef) { String name = entityRef.getNodeName(); Document doc = entityRef.getOwnerDocument(); DocumentType doctype = doc.getDoctype(); if (doctype == null) { return (false); } NamedNodeMap entities = doctype.getEntities(); Entity entity = (Entity)entities.getNamedItem(name); if (entity == null) { return (false); } return (entity.getNotationName() == null); } }
public boolean isParsedEntity (final EntityReference entityRef) { final String name = entityRef.getNodeName (); final Document doc = entityRef.getOwnerDocument (); final DocumentType doctype = doc.getDoctype (); if (doctype == null) { return (false); } final NamedNodeMap entities = doctype.getEntities (); final Entity entity = (Entity) entities.getNamedItem (name); if (entity == null) { return (false); } return (entity.getNotationName () == null); } }
protected void runTest() throws Throwable { Document document = dbf.newDocumentBuilder().newDocument(); EntityReference entref = document.createEntityReference("myentity"); assertEquals(Node.ENTITY_REFERENCE_NODE, entref.getNodeType()); assertEquals("myentity", entref.getNodeName()); assertNull(entref.getNodeValue()); assertSame(document, entref.getOwnerDocument()); } }
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();
DocumentType docType = node.getOwnerDocument().getDoctype(); if (docType != null) { NamedNodeMap entities = docType.getEntities();