/** * Fetch JAXB Nodes matching an XPath (for example "//w:p"). * * If you have modified your JAXB objects (eg added or changed a * w:p paragraph), you need to update the association. The problem * is that this can only be done ONCE, owing to a bug in JAXB: * see https://github.com/javaee/jaxb-v2/issues/459 * * So this is left for you to choose to do via the refreshXmlFirst parameter. * * @param xpathExpr * @param refreshXmlFirst * @return * @throws JAXBException * @throws XPathBinderAssociationIsPartialException */ public List<Object> getJAXBNodesViaXPath(String xpathExpr, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException { Binder<Node> binder = getBinder(); E el = getJaxbElement(); return XmlUtils.getJAXBNodesViaXPath(binder, el, xpathExpr, refreshXmlFirst); }
return XmlUtils.getJAXBAssociationsForXPath(binder, getJaxbElement(), xpathExpr, refreshXmlFirst);
log.debug("creating binder for " + this.getJaxbElement().getClass().getName()); org.w3c.dom.Document doc = XmlUtils.neww3cDomDocument(); this.marshal(doc);
/** * Fetch JAXB Nodes matching an XPath (for example "//w:p"). * * If you have modified your JAXB objects (eg added or changed a * w:p paragraph), you need to update the association. The problem * is that this can only be done ONCE, owing to a bug in JAXB: * see https://github.com/javaee/jaxb-v2/issues/459 * * So this is left for you to choose to do via the refreshXmlFirst parameter. * * @param xpathExpr * @param refreshXmlFirst * @return * @throws JAXBException * @throws XPathBinderAssociationIsPartialException */ public List<Object> getJAXBNodesViaXPath(String xpathExpr, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException { Binder<Node> binder = getBinder(); E el = getJaxbElement(); return XmlUtils.getJAXBNodesViaXPath(binder, el, xpathExpr, refreshXmlFirst); }
return XmlUtils.getJAXBAssociationsForXPath(binder, getJaxbElement(), xpathExpr, refreshXmlFirst);
log.debug("creating binder for " + this.getJaxbElement().getClass().getName()); org.w3c.dom.Document doc = XmlUtils.neww3cDomDocument(); this.marshal(doc);