本文整理了Java中org.w3c.dom.Entity.getNodeName()
方法的一些代码示例,展示了Entity.getNodeName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getNodeName()
方法的具体详情如下:
包路径:org.w3c.dom.Entity
类名称:Entity
方法名:getNodeName
暂无
代码示例来源:origin: robovm/robovm
: node.getNamespaceURI();
String entName =
ent.getNodeName() == null ? "" : ent.getNodeName();
String entNamespaceURI =
ent.getNamespaceURI() == null ? "" : ent.getNamespaceURI();
代码示例来源:origin: plutext/docx4j
: node.getNamespaceURI();
String entName =
ent.getNodeName() == null ? "" : ent.getNodeName();
String entNamespaceURI =
ent.getNamespaceURI() == null ? "" : ent.getNamespaceURI();
代码示例来源:origin: org.glassfish.external/schema2beans
protected void write(Entity entity) throws java.io.IOException {
out.write("<!ENTITY "+entity.getNodeName());
/*
We don't seem to be able to get any useful info out of the
Entity object.
out.write(" notation ");
if (entity.getNotationName() != null)
out.write(entity.getNotationName());
out.write(" publicid ");
if (entity.getPublicId() != null)
out.write(entity.getPublicId());
out.write(" systemid ");
if (entity.getSystemId() != null)
out.write(entity.getSystemId());
*/
out.write(" UNKNOWN>");
}
代码示例来源:origin: org.vx68k.quercus/quercus
sb.append(entity.getNodeName());
代码示例来源:origin: com.helger/ph-isorelax
public boolean enter (final Entity entity)
{
final String name = entity.getNodeName ();
final String pid = entity.getPublicId ();
final String sid = entity.getSystemId ();
final String notation = entity.getNotationName ();
buffer_.append ("<!ENTITY ").append (name);
if (sid != null)
{
if (pid != null)
buffer_.append (" PUBLIC \"").append (pid).append ("\" \"").append (UXML.escapeSystemQuot (sid)).append ("\">");
else
buffer_.append (" SYSTEM \"").append (UXML.escapeSystemQuot (sid)).append ("\">");
if (notation != null)
buffer_.append (" NDATA ").append (notation).append (">");
}
else
{
buffer_.append (" \"");
final XMLMaker entityMaker = new XMLMaker ();
UDOMVisitor.traverseChildren (entity, entityMaker);
buffer_.append (UXML.escapeEntityQuot (entityMaker.getText ())).append ("\"").append (">");
}
return false;
}
代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax
private void _handleInternalEntity(Entity entity) {
try {
decl_.internalEntityDecl(
entity.getNodeName(),
UDOM.getXMLText(entity)
);
} catch (SAXException e) {
_errorReport(e);
}
}
代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi
private void _handleInternalEntity(Entity entity) {
try {
decl_.internalEntityDecl(entity.getNodeName(), UDOM.getXMLText(entity));
}
catch(SAXException saxexception) {
_errorReport(saxexception);
}
}
代码示例来源:origin: com.phloc/isorelax
private void _handleInternalEntity (final Entity entity)
{
try
{
decl_.internalEntityDecl (entity.getNodeName (), UDOM.getXMLText (entity));
}
catch (final SAXException e)
{
_errorReport (e);
}
}
代码示例来源:origin: com.phloc/isorelax
private void _handleInternalEntity (final Entity entity)
{
try
{
decl_.internalEntityDecl (entity.getNodeName (), UDOM.getXMLText (entity));
}
catch (final SAXException e)
{
_errorReport (e);
}
}
代码示例来源:origin: com.helger/ph-isorelax
private void _handleInternalEntity (final Entity entity)
{
try
{
decl_.internalEntityDecl (entity.getNodeName (), UDOM.getXMLText (entity));
}
catch (final SAXException e)
{
_errorReport (e);
}
}
代码示例来源:origin: com.helger/ph-isorelax
private void _handleInternalEntity (final Entity entity)
{
try
{
decl_.internalEntityDecl (entity.getNodeName (), UDOM.getXMLText (entity));
}
catch (final SAXException e)
{
_errorReport (e);
}
}
代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi
private void _handleInternalEntity(Entity entity) {
try {
decl_.internalEntityDecl(entity.getNodeName(), UDOM.getXMLText(entity));
}
catch(SAXException saxexception) {
_errorReport(saxexception);
}
}
代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax
private void _handleInternalEntity(Entity entity) {
try {
decl_.internalEntityDecl(
entity.getNodeName(),
UDOM.getXMLText(entity));
} catch (SAXException e) {
_errorReport(e);
}
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
if (e.getNotationName() != null) {
String name = e.getNodeName();
String systemId = e.getSystemId();
try {
代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite
/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
NamedNodeMap entityList;
Entity entityNode;
String entityName;
doc = (Document) load("staff", false);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
entityList = docType.getEntities();
assertNotNull("entitiesNotNull", entityList);
entityNode = (Entity) entityList.getNamedItem("ent1");
entityName = entityNode.getNodeName();
assertEquals("entityGetEntityNameAssert", "ent1", entityName);
}
/**
代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi
private void _handleEntities(DocumentType documenttype) {
try {
NamedNodeMap namednodemap = documenttype.getEntities();
int i = namednodemap.getLength();
for(int j = 0; j < i; j++) {
Entity entity = (Entity)namednodemap.item(j);
String s = entity.getPublicId();
String s1 = entity.getSystemId();
String s2 = entity.getNotationName();
if(s != null || s1 != null)
_handleExternalEntity(entity.getNodeName(), s, s1, s2);
else
_handleInternalEntity(entity);
}
NamedNodeMap namednodemap1 = documenttype.getNotations();
int k = namednodemap1.getLength();
for(int l = 0; l < k; l++) {
Notation notation = (Notation)namednodemap1.item(l);
String s3 = notation.getPublicId();
String s4 = notation.getSystemId();
dtd_.notationDecl(notation.getNodeName(), s3, s4);
}
}
catch(SAXException saxexception) {
_errorReport(saxexception);
}
}
代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi
private void _handleEntities(DocumentType documenttype) {
try {
NamedNodeMap namednodemap = documenttype.getEntities();
int i = namednodemap.getLength();
for(int j = 0; j < i; j++) {
Entity entity = (Entity)namednodemap.item(j);
String s = entity.getPublicId();
String s1 = entity.getSystemId();
String s2 = entity.getNotationName();
if(s != null || s1 != null)
_handleExternalEntity(entity.getNodeName(), s, s1, s2);
else
_handleInternalEntity(entity);
}
NamedNodeMap namednodemap1 = documenttype.getNotations();
int k = namednodemap1.getLength();
for(int l = 0; l < k; l++) {
Notation notation = (Notation)namednodemap1.item(l);
String s3 = notation.getPublicId();
String s4 = notation.getSystemId();
dtd_.notationDecl(notation.getNodeName(), s3, s4);
}
}
catch(SAXException saxexception) {
_errorReport(saxexception);
}
}
代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax
if (publicID != null || systemID != null) {
_handleExternalEntity(
entity.getNodeName(),
publicID,
systemID,
代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax
if (publicID != null || systemID != null) {
_handleExternalEntity(
entity.getNodeName(),
publicID,
systemID,
代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite
/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
Document doc;
DOMConfiguration domConfig;
DocumentType docType;
NamedNodeMap entitiesMap;
String nullNS = null;
Entity entity;
String entityName;
boolean canSet;
doc = (Document) load("hc_staff", false);
domConfig = doc.getDomConfig();
canSet = domConfig.canSetParameter("entities", Boolean.FALSE);
assertTrue("domconfigurationcansetparameter03_1", canSet);
doc.normalizeDocument();
docType = doc.getDoctype();
entitiesMap = docType.getEntities();
entity = (Entity) entitiesMap.getNamedItemNS(nullNS, "epsilon");
entityName = entity.getNodeName();
assertEquals("domconfigurationcansetparameter03_2", "epsilon", entityName);
}
/**
内容来源于网络,如有侵权,请联系作者删除!