本文整理了Java中nu.xom.Element.getParent()
方法的一些代码示例,展示了Element.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getParent()
方法的具体详情如下:
包路径:nu.xom.Element
类名称:Element
方法名:getParent
暂无
代码示例来源:origin: com.thoughtworks.xstream/xstream
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: jaxen/jaxen
public Iterator getNamespaceAxisIterator(Object o)
{
if (! isElement(o)) {
return JaxenConstants.EMPTY_ITERATOR;
}
Map nsMap = new HashMap();
Element elt = (Element)o;
ParentNode parent = elt;
while (parent instanceof Element) {
elt = (Element)parent;
String uri = elt.getNamespaceURI();
String prefix = elt.getNamespacePrefix();
addNamespaceForElement(elt, uri, prefix, nsMap);
int count = elt.getNamespaceDeclarationCount();
for (int i = 0; i < count; i++) {
prefix = elt.getNamespacePrefix(i);
uri = elt.getNamespaceURI(prefix);
addNamespaceForElement(elt, uri, prefix, nsMap);
}
parent = elt.getParent();
}
addNamespaceForElement(elt, "http://www.w3.org/XML/1998/namespace", "xml", nsMap);
return nsMap.values().iterator();
}
}
代码示例来源:origin: x-stream/xstream
@Override
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: edu.internet2.middleware.grouper/grouperClient
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: org.jvnet.hudson/xstream
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
protected Object getParent() {
return currentElement.getParent();
}
代码示例来源:origin: org.concordion/concordion
/**
* Returns the element that contains this element, or null if this element is the root element or
* is orphaned.
*
* @return Element
*/
public Element getParentElement() {
ParentNode parent = xomElement.getParent();
if (parent == null || parent instanceof Document) {
return null;
}
return new Element((nu.xom.Element) parent);
}
代码示例来源:origin: concordion/concordion
/**
* Returns the element that contains this element, or null if this element is the root element or
* is orphaned.
*
* @return Element
*/
public Element getParentElement() {
ParentNode parent = xomElement.getParent();
if (parent == null || parent instanceof Document) {
return null;
}
return new Element((nu.xom.Element) parent);
}
代码示例来源:origin: concordion/concordion
public void appendSister(Element element) {
nu.xom.Element xomParentElement = (nu.xom.Element) xomElement.getParent();
int elementIndex = xomParentElement.indexOf(xomElement);
xomParentElement.insertChild(element.xomElement, elementIndex + 1);
}
代码示例来源:origin: org.concordion/concordion
public void appendSister(Element element) {
nu.xom.Element xomParentElement = (nu.xom.Element) xomElement.getParent();
int elementIndex = xomParentElement.indexOf(xomElement);
xomParentElement.insertChild(element.xomElement, elementIndex + 1);
}
代码示例来源:origin: org.teiid/saxon-xom
public Nodes finishMakingElement(Element element) {
flush();
try {
serializer.writeEndTag();
} catch (IOException e) {
throw new RuntimeException(e);
}
if (element.getParent() instanceof Document) {
return new Nodes(element);
}
return NONE;
}
代码示例来源:origin: teiid/teiid
public Nodes finishMakingElement(Element element) {
flush();
try {
serializer.writeEndTag();
} catch (IOException e) {
throw new RuntimeException(e);
}
if (element.getParent() instanceof Document) {
return new Nodes(element);
}
return NONE;
}
代码示例来源:origin: org.codehaus.mojo/emma-maven-plugin
/**
* Get full class name (package + class) for "class" XML element.
*
* @param elem The element.
* @return the full class name (package + class) for "class" XML element.
*/
private String fullClassName( Element elem )
{
final Element packageElem = (Element) elem.getParent().getParent();
final String packageName = packageElem.getAttributeValue( "name" );
final String className = elem.getAttributeValue( "name" );
return packageName.length() != 0 ? packageName + "." + className : className;
}
代码示例来源:origin: org.xml-cml/cmlxom
public static void detach(nu.xom.Element element) {
ParentNode parent = (element == null) ? null : element.getParent();
if (parent != null) {
if (parent instanceof Document) {
parent.replaceChild(element, new Element(DUMMY));
} else {
element.detach();
}
}
}
代码示例来源:origin: nu.validator/htmlparser
@Override protected void insertFosterParentedChild(Element child,
Element table, Element stackParent) throws SAXException {
try {
Node parent = table.getParent();
if (parent != null) { // always an element if not null
((ParentNode)parent).insertChild(child, indexOfTable(table, stackParent));
cachedTableIndex++;
} else {
stackParent.appendChild(child);
}
} catch (XMLException e) {
fatal(e);
}
}
代码示例来源:origin: validator/htmlparser
@Override protected void insertFosterParentedChild(Element child,
Element table, Element stackParent) throws SAXException {
try {
Node parent = table.getParent();
if (parent != null) { // always an element if not null
((ParentNode)parent).insertChild(child, indexOfTable(table, stackParent));
cachedTableIndex++;
} else {
stackParent.appendChild(child);
}
} catch (XMLException e) {
fatal(e);
}
}
代码示例来源:origin: nu.validator.htmlparser/htmlparser
@Override protected void insertFosterParentedChild(Element child,
Element table, Element stackParent) throws SAXException {
try {
Node parent = table.getParent();
if (parent != null) { // always an element if not null
((ParentNode)parent).insertChild(child, indexOfTable(table, stackParent));
cachedTableIndex++;
} else {
stackParent.appendChild(child);
}
} catch (XMLException e) {
fatal(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!