本文整理了Java中org.jdom.DocType.getSystemID()
方法的一些代码示例,展示了DocType.getSystemID()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DocType.getSystemID()
方法的具体详情如下:
包路径:org.jdom.DocType
类名称:DocType
方法名:getSystemID
[英]This will retrieve the system ID of an externally referenced DTD, or an empty String
if none is referenced.
[中]这将检索外部引用的DTD的系统ID,如果没有引用,则检索空的String
。
代码示例来源:origin: org.freemarker/freemarker
result.add(new Attribute("publicId", doctype.getPublicID()));
} else if ("systemId".equals(localName)) {
result.add(new Attribute("systemId", doctype.getSystemID()));
} else if ("elementName".equals(localName)) {
result.add(new Attribute("elementName", doctype.getElementName()));
代码示例来源:origin: org.freemarker/freemarker
attr = new Attribute("publicId", doctype.getPublicID());
else if ("systemId".equals(localName))
attr = new Attribute("systemId", doctype.getSystemID());
else if ("elementName".equals(localName))
attr = new Attribute("elementName", doctype.getElementName());
代码示例来源:origin: org.sonatype.maven.archetype/archetype-common
String systemID=docType.getSystemID();
String internalSubset=docType.getInternalSubset();
boolean hasPublic=false;
代码示例来源:origin: org.jdom/jdom-legacy
String systemID = docType.getSystemID();
String internalSubset = docType.getInternalSubset();
boolean hasPublic = false;
代码示例来源:origin: apache/maven-archetype
String systemID = docType.getSystemID();
String internalSubset = docType.getInternalSubset();
boolean hasPublic = false;
代码示例来源:origin: com.sun.syndication/com.springsource.com.sun.syndication
public boolean isMyType(Document document) {
boolean ok = false;
Element rssRoot = document.getRootElement();
ok = rssRoot.getName().equals("rss");
if (ok) {
ok = false;
Attribute version = rssRoot.getAttribute("version");
if (version!=null) {
ok = version.getValue().equals(getRSSVersion());
if (ok) {
ok = false;
DocType docType = document.getDocType();
if (docType!=null) {
ok = ELEMENT_NAME.equals(docType.getElementName());
ok = ok && PUBLIC_ID.equals(docType.getPublicID());
ok = ok && SYSTEM_ID.equals(docType.getSystemID());
}
}
}
}
return ok;
}
代码示例来源:origin: rome/rome
public boolean isMyType(Document document) {
boolean ok = false;
Element rssRoot = document.getRootElement();
ok = rssRoot.getName().equals("rss");
if (ok) {
ok = false;
Attribute version = rssRoot.getAttribute("version");
if (version!=null) {
ok = version.getValue().equals(getRSSVersion());
if (ok) {
ok = false;
DocType docType = document.getDocType();
if (docType!=null) {
ok = ELEMENT_NAME.equals(docType.getElementName());
ok = ok && PUBLIC_ID.equals(docType.getPublicID());
ok = ok && SYSTEM_ID.equals(docType.getSystemID());
}
}
}
}
return ok;
}
代码示例来源:origin: org.freemarker/freemarker-gae
result.add(new Attribute("publicId", doctype.getPublicID()));
} else if ("systemId".equals(localName)) {
result.add(new Attribute("systemId", doctype.getSystemID()));
} else if ("elementName".equals(localName)) {
result.add(new Attribute("elementName", doctype.getElementName()));
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
result.add(new Attribute("publicId", doctype.getPublicID()));
} else if ("systemId".equals(localName)) {
result.add(new Attribute("systemId", doctype.getSystemID()));
} else if ("elementName".equals(localName)) {
result.add(new Attribute("elementName", doctype.getElementName()));
代码示例来源:origin: org.freemarker/com.springsource.freemarker
result.add(new Attribute("systemId", doctype.getSystemID()));
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
attr = new Attribute("publicId", doctype.getPublicID());
else if ("systemId".equals(localName))
attr = new Attribute("systemId", doctype.getSystemID());
else if ("elementName".equals(localName))
attr = new Attribute("elementName", doctype.getElementName());
代码示例来源:origin: org.freemarker/freemarker-gae
attr = new Attribute("publicId", doctype.getPublicID());
else if ("systemId".equals(localName))
attr = new Attribute("systemId", doctype.getSystemID());
else if ("elementName".equals(localName))
attr = new Attribute("elementName", doctype.getElementName());
代码示例来源:origin: org.freemarker/com.springsource.freemarker
attr = new Attribute("publicId", doctype.getPublicID());
else if ("systemId".equals(localName))
attr = new Attribute("systemId", doctype.getSystemID());
else if ("elementName".equals(localName))
attr = new Attribute("elementName", doctype.getElementName());
代码示例来源:origin: org.jdom/jdom-legacy
/**
* <p>
* This method tells you the line of the XML file being parsed.
* For an in-memory document, it's meaningless. The location
* is only valid for the current parsing lifecycle, but
* the document has already been parsed. Therefore, it returns
* -1 for both line and column numbers.
* </p>
*
* @param document JDOM <code>Document</code>.
*/
private void documentLocator(Document document) {
locator = new JDOMLocator();
String publicID = null;
String systemID = null;
if (document != null) {
DocType docType = document.getDocType();
if (docType != null) {
publicID = docType.getPublicID();
systemID = docType.getSystemID();
}
}
locator.setPublicId(publicID);
locator.setSystemId(systemID);
locator.setLineNumber(-1);
locator.setColumnNumber(-1);
contentHandler.setDocumentLocator(locator);
}
代码示例来源:origin: org.jdom/jdom-legacy
/**
* This creates an empty <code>Document</code> object based
* on a specific parser implementation with the given DOCTYPE.
* If the doctype parameter is null, the behavior is the same as
* calling <code>createDocument()</code>.
*
* @param doctype Initial <code>DocType</code> of the document.
* @return <code>Document</code> - created DOM Document.
* @throws JDOMException when errors occur.
*/
public Document createDocument(DocType doctype) throws JDOMException {
if (doctype == null) {
return createDocument();
}
DOMImplementation domImpl = createDocument().getImplementation();
DocumentType domDocType = domImpl.createDocumentType(
doctype.getElementName(),
doctype.getPublicID(),
doctype.getSystemID());
// Set the internal subset if possible
setInternalSubset(domDocType, doctype.getInternalSubset());
return domImpl.createDocument("http://temporary",
doctype.getElementName(),
domDocType);
}
内容来源于网络,如有侵权,请联系作者删除!