- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getAttributes()
方法的一些代码示例,展示了XhtmlNode.getAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlNode.getAttributes()
方法的具体详情如下:
包路径:org.hl7.fhir.utilities.xhtml.XhtmlNode
类名称:XhtmlNode
方法名:getAttributes
暂无
代码示例来源:origin: jamesagnew/hapi-fhir
public String getAttribute(String name) {
return getAttributes().get(name);
}
代码示例来源:origin: jamesagnew/hapi-fhir
public XhtmlNode setAttribute(String name, String value) {
getAttributes().put(name, value);
return this;
}
代码示例来源:origin: jamesagnew/hapi-fhir
public boolean hasAttribute(String name) {
return getAttributes().containsKey(name);
}
代码示例来源:origin: jamesagnew/hapi-fhir
private String checkNS(XhtmlNode res, Element node, String defaultNS) {
if (!validatorMode)
return null;
String ns = node.getNamespaceURI();
if (ns == null)
return null;
if (!ns.equals(defaultNS)) {
res.getAttributes().put("xmlns", ns);
return ns;
}
return defaultNS;
}
代码示例来源:origin: jamesagnew/hapi-fhir
private String attributes(XhtmlNode node) {
StringBuilder s = new StringBuilder();
for (String n : node.getAttributes().keySet())
s.append(" " + n + "=\"" + escapeHtml(node.getAttributes().get(n)) + "\"");
return s.toString();
}
代码示例来源:origin: jamesagnew/hapi-fhir
public XhtmlNode parseHtmlNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
XhtmlNode res = parseNode(xpp);
if (res.getNsDecl() == null)
res.getAttributes().put("xmlns", XHTML_NS);
return res;
}
private XhtmlNode parseNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
代码示例来源:origin: jamesagnew/hapi-fhir
public XhtmlNode parseHtmlNode(Element node, String defaultNS) throws FHIRFormatError {
XhtmlNode res = parseNode(node, defaultNS);
if (res.getNsDecl() == null)
res.getAttributes().put("xmlns", XHTML_NS);
return res;
}
代码示例来源:origin: jamesagnew/hapi-fhir
private void composeElement(IXMLWriter xml, XhtmlNode node, boolean noPrettyOverride) throws IOException {
for (String n : node.getAttributes().keySet()) {
if (n.equals("xmlns"))
xml.setDefaultNamespace(node.getAttributes().get(n));
else if (n.startsWith("xmlns:"))
xml.namespace(n.substring(6), node.getAttributes().get(n));
else
xml.attribute(n, node.getAttributes().get(n));
}
xml.enter(XHTML_NS, node.getName());
for (XhtmlNode n : node.getChildNodes())
compose(xml, n, noPrettyOverride || node.isNoPretty());
xml.exit(XHTML_NS, node.getName());
}
代码示例来源:origin: jamesagnew/hapi-fhir
private XhtmlNode parseNode(Element node, String defaultNS) throws FHIRFormatError {
XhtmlNode res = new XhtmlNode(NodeType.Element);
res.setName(node.getLocalName());
defaultNS = checkNS(res, node, defaultNS);
for (int i = 0; i < node.getAttributes().getLength(); i++) {
Attr attr = (Attr) node.getAttributes().item(i);
if (attributeIsOk(res.getName(), attr.getName(), attr.getValue()) && !attr.getLocalName().startsWith("xmlns"))
res.getAttributes().put(attr.getName(), attr.getValue());
}
Node child = node.getFirstChild();
while (child != null) {
if (child.getNodeType() == Node.TEXT_NODE) {
res.addText(child.getTextContent());
} else if (child.getNodeType() == Node.COMMENT_NODE) {
res.addComment(child.getTextContent());
} else if (child.getNodeType() == Node.ELEMENT_NODE) {
if (elementIsOk(child.getLocalName()))
res.getChildNodes().add(parseNode((Element) child, defaultNS));
} else
throw new FHIRFormatError("Unhandled XHTML feature: "+Integer.toString(child.getNodeType())+descLoc());
child = child.getNextSibling();
}
return res;
}
代码示例来源:origin: jamesagnew/hapi-fhir
NSMap result = new NSMap(nsm);
List<String> nsattrs = new ArrayList<String>();
for (String an : node.getAttributes().keySet()) {
if (an.equals("xmlns")) {
result.def(node.getAttribute(an));
node.getAttributes().remove(s);
if (n.hasNs()) {
String nns = result.get(n.getNs());
if (!nns.equals(result.def())) {
node.getAttributes().put("xmlns", nns);
result.def(nns);
node.getAttributes().put("xmlns", result.def());
代码示例来源:origin: jamesagnew/hapi-fhir
private XhtmlNode parseNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
XhtmlNode res = new XhtmlNode(NodeType.Element);
res.setName(xpp.getName());
for (int i = 0; i < xpp.getAttributeCount(); i++) {
if (attributeIsOk(xpp.getName(), xpp.getAttributeName(i), xpp.getAttributeValue(i)))
res.getAttributes().put(xpp.getAttributeName(i), xpp.getAttributeValue(i));
}
int eventType = xpp.next();
while (eventType != XmlPullParser.END_TAG) {
if (eventType == XmlPullParser.TEXT) {
res.addText(xpp.getText());
xpp.next();
} else if (eventType == XmlPullParser.COMMENT) {
res.addComment(xpp.getText());
xpp.next();
} else if (eventType == XmlPullParser.START_TAG) {
if (elementIsOk(xpp.getName()))
res.getChildNodes().add(parseNode(xpp));
} else
throw new FHIRFormatError("Unhandled XHTML feature: "+Integer.toString(eventType)+descLoc());
eventType = xpp.getEventType();
}
xpp.next();
return res;
}
代码示例来源:origin: jamesagnew/hapi-fhir
node.getAttributes().put(name, null);
else if (peekChar() != '=')
readChar();
if (peekChar() == '"' || peekChar() == '\'')
node.getAttributes().put(name, parseAttributeValue(readChar()));
else
node.getAttributes().put(name, parseAttributeValue('\0'));
代码示例来源:origin: jamesagnew/hapi-fhir
private void checkInnerNames(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) {
for (XhtmlNode node : list) {
if (node.getNodeType() == NodeType.Element) {
rule(errors, IssueType.INVALID, e.line(), e.col(), path, Utilities.existsInList(node.getName(),
"p", "br", "div", "h1", "h2", "h3", "h4", "h5", "h6", "a", "span", "b", "em", "i", "strong",
"small", "big", "tt", "small", "dfn", "q", "var", "abbr", "acronym", "cite", "blockquote", "hr", "address", "bdo", "kbd", "q", "sub", "sup",
"ul", "ol", "li", "dl", "dt", "dd", "pre", "table", "caption", "colgroup", "col", "thead", "tr", "tfoot", "tbody", "th", "td",
"code", "samp", "img", "map", "area"
), "Illegal element name in the XHTML ('"+node.getName()+"')");
for (String an : node.getAttributes().keySet()) {
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an,
"title", "style", "class", "id", "lang", "xml:lang", "dir", "accesskey", "tabindex",
// tables
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan", "colspan") ||
Utilities.existsInList(node.getName()+"."+an, "a.href", "a.name", "img.src", "img.border", "div.xmlns", "blockquote.cite", "q.cite",
"a.charset", "a.type", "a.name", "a.href", "a.hreflang", "a.rel", "a.rev", "a.shape", "a.coords", "img.src",
"img.alt", "img.longdesc", "img.height", "img.width", "img.usemap", "img.ismap", "map.name", "area.shape",
"area.coords", "area.href", "area.nohref", "area.alt", "table.summary", "table.width", "table.border",
"table.frame", "table.rules", "table.cellspacing", "table.cellpadding", "pre.space"
);
if (!ok)
rule(errors, IssueType.INVALID, e.line(), e.col(), path, false, "Illegal attribute name in the XHTML ('"+an+"' on '"+node.getName()+"')");
}
checkInnerNames(errors, e, path, node.getChildNodes());
}
}
}
代码示例来源:origin: jamesagnew/hapi-fhir
private void checkInnerNames(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) {
for (XhtmlNode node : list) {
if (node.getNodeType() == NodeType.Element) {
rule(errors, IssueType.INVALID, e.line(), e.col(), path, Utilities.existsInList(node.getName(),
"p", "br", "div", "h1", "h2", "h3", "h4", "h5", "h6", "a", "span", "b", "em", "i", "strong",
"small", "big", "tt", "small", "dfn", "q", "var", "abbr", "acronym", "cite", "blockquote", "hr", "address", "bdo", "kbd", "q", "sub", "sup",
"ul", "ol", "li", "dl", "dt", "dd", "pre", "table", "caption", "colgroup", "col", "thead", "tr", "tfoot", "tbody", "th", "td",
"code", "samp", "img", "map", "area"
), "Illegal element name in the XHTML ('"+node.getName()+"')");
for (String an : node.getAttributes().keySet()) {
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an,
"title", "style", "class", "id", "lang", "xml:lang", "dir", "accesskey", "tabindex",
// tables
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan", "colspan") ||
Utilities.existsInList(node.getName()+"."+an, "a.href", "a.name", "img.src", "img.border", "div.xmlns", "blockquote.cite", "q.cite",
"a.charset", "a.type", "a.name", "a.href", "a.hreflang", "a.rel", "a.rev", "a.shape", "a.coords", "img.src",
"img.alt", "img.longdesc", "img.height", "img.width", "img.usemap", "img.ismap", "map.name", "area.shape",
"area.coords", "area.href", "area.nohref", "area.alt", "table.summary", "table.width", "table.border",
"table.frame", "table.rules", "table.cellspacing", "table.cellpadding", "pre.space"
);
if (!ok)
rule(errors, IssueType.INVALID, e.line(), e.col(), path, false, "Illegal attribute name in the XHTML ('"+an+"' on '"+node.getName()+"')");
}
checkInnerNames(errors, e, path, node.getChildNodes());
}
}
}
代码示例来源:origin: jamesagnew/hapi-fhir
private void checkInnerNames(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) {
for (XhtmlNode node : list) {
if (node.getNodeType() == NodeType.Element) {
rule(errors, IssueType.INVALID, e.line(), e.col(), path, Utilities.existsInList(node.getName(),
"p", "br", "div", "h1", "h2", "h3", "h4", "h5", "h6", "a", "span", "b", "em", "i", "strong",
"small", "big", "tt", "small", "dfn", "q", "var", "abbr", "acronym", "cite", "blockquote", "hr", "address", "bdo", "kbd", "q", "sub", "sup",
"ul", "ol", "li", "dl", "dt", "dd", "pre", "table", "caption", "colgroup", "col", "thead", "tr", "tfoot", "tbody", "th", "td",
"code", "samp", "img", "map", "area"
), "Illegal element name in the XHTML ('"+node.getName()+"')");
for (String an : node.getAttributes().keySet()) {
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an,
"title", "style", "class", "id", "lang", "xml:lang", "dir", "accesskey", "tabindex",
// tables
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan", "colspan") ||
Utilities.existsInList(node.getName()+"."+an, "a.href", "a.name", "img.src", "img.border", "div.xmlns", "blockquote.cite", "q.cite",
"a.charset", "a.type", "a.name", "a.href", "a.hreflang", "a.rel", "a.rev", "a.shape", "a.coords", "img.src",
"img.alt", "img.longdesc", "img.height", "img.width", "img.usemap", "img.ismap", "map.name", "area.shape",
"area.coords", "area.href", "area.nohref", "area.alt", "table.summary", "table.width", "table.border",
"table.frame", "table.rules", "table.cellspacing", "table.cellpadding", "pre.space", "td.nowrap"
);
if (!ok)
rule(errors, IssueType.INVALID, e.line(), e.col(), path, false, "Illegal attribute name in the XHTML ('"+an+"' on '"+node.getName()+"')");
}
checkInnerNames(errors, e, path, node.getChildNodes());
}
}
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities
public XhtmlNode setAttribute(String name, String value) {
getAttributes().put(name, value);
return this;
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities
private String checkNS(XhtmlNode res, Element node, String defaultNS) {
if (!validatorMode)
return null;
String ns = node.getNamespaceURI();
if (ns == null)
return null;
if (!ns.equals(defaultNS)) {
res.getAttributes().put("xmlns", ns);
return ns;
}
return defaultNS;
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities
private String attributes(XhtmlNode node) {
StringBuilder s = new StringBuilder();
for (String n : node.getAttributes().keySet())
s.append(" " + n + "=\"" + escapeHtml(node.getAttributes().get(n)) + "\"");
return s.toString();
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities
public XhtmlNode parseHtmlNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
XhtmlNode res = parseNode(xpp);
if (res.getNsDecl() == null)
res.getAttributes().put("xmlns", XHTML_NS);
return res;
}
private XhtmlNode parseNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities
public XhtmlNode parseHtmlNode(Element node, String defaultNS) throws FHIRFormatError {
XhtmlNode res = parseNode(node, defaultNS);
if (res.getNsDecl() == null)
res.getAttributes().put("xmlns", XHTML_NS);
return res;
}
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getAttributes()方法的一些代码示例,展示了XhtmlNode.getAttributes
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getNodeType()方法的一些代码示例,展示了XhtmlNode.getNodeType()的具
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.setValueAsString()方法的一些代码示例,展示了XhtmlNode.setValueAs
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.addText()方法的一些代码示例,展示了XhtmlNode.addText()的具体用法。这些代码
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getName()方法的一些代码示例,展示了XhtmlNode.getName()的具体用法。这些代码
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.addTag()方法的一些代码示例,展示了XhtmlNode.addTag()的具体用法。这些代码示例
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getValueAsString()方法的一些代码示例,展示了XhtmlNode.getValueAs
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.isEmpty()方法的一些代码示例,展示了XhtmlNode.isEmpty()的具体用法。这些代码
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getChildNodes()方法的一些代码示例,展示了XhtmlNode.getChildNodes
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.copy()方法的一些代码示例,展示了XhtmlNode.copy()的具体用法。这些代码示例主要来源
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getNsDecl()方法的一些代码示例,展示了XhtmlNode.getNsDecl()的具体用法。
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.allText()方法的一些代码示例,展示了XhtmlNode.allText()的具体用法。这些代码
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.()方法的一些代码示例,展示了XhtmlNode.()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.equalsDeep()方法的一些代码示例,展示了XhtmlNode.equalsDeep()的具体用
我是一名优秀的程序员,十分优秀!