ProcessingInstruction pi = (ProcessingInstruction) node; if ("target".equals(localName)) { result.add(new DefaultAttribute("target", pi.getTarget())); } else if ("data".equals(localName)) { result.add(new DefaultAttribute("data", pi.getText())); } else { result.add(new DefaultAttribute(localName, pi.getValue(localName))); result.add(new DefaultAttribute("publicId", doctype.getPublicID())); } else if ("systemId".equals(localName)) { result.add(new DefaultAttribute("systemId", doctype.getSystemID())); } else if ("elementName".equals(localName)) { result.add(new DefaultAttribute("elementName", doctype.getElementName()));
/** * Returns a value of an attribute. * * @param xpath needs to point to an attribute of a single node. * @return value of an attribute of a single node. */ public String attributeValue(String xpath) { try { DefaultAttribute at = (DefaultAttribute)doc.selectObject(xpath); return at.getText(); } catch(ClassCastException e){ throw new IllegalArgumentException("Found result is not an attribute, ensure that you have the right expression which evaluates to attribute."); } catch (Exception e) { throw new RuntimeException(e); } }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
/** * Returns a value of an attribute. * * @param xpath needs to point to an attribute of a single node. * @return value of an attribute of a single node. */ public String attributeValue(String xpath) { try { DefaultAttribute at = (DefaultAttribute)doc.selectObject(xpath); return at.getText(); } catch(ClassCastException e){ throw new IllegalArgumentException("Found result is not an attribute, ensure that you have the right expression which evaluates to attribute."); } catch (Exception e) { throw new RuntimeException(e); } }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
/** * Returns a value of an attribute. * * @param xpath needs to point to an attribute of a single node. * @return value of an attribute of a single node. */ public String attributeValue(String xpath) { try { DefaultAttribute at = (DefaultAttribute)doc.selectObject(xpath); return at.getText(); } catch(ClassCastException e){ throw new IllegalArgumentException("Found result is not an attribute, ensure that you have the right expression which evaluates to attribute."); } catch (Exception e) { throw new RuntimeException(e); } }
protected Node createXPathResult(Element parent) { return new DefaultAttribute(parent, getQName(), getValue()); } }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }
public Attribute createAttribute(Element owner, QName qname, String value) { return new DefaultAttribute(qname, value); }