/** * Fetch JAXB Nodes matching an XPath (for example ".//w:p" - note the dot, * which is necessary for this sort of relative path). * * 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 someJaxbElement * @param refreshXmlFirst * @return * @throws JAXBException * @throws XPathBinderAssociationIsPartialException */ public List<Object> getJAXBNodesViaXPath(String xpathExpr, Object someJaxbElement, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException { return XmlUtils.getJAXBNodesViaXPath(getBinder(), someJaxbElement, xpathExpr, refreshXmlFirst); }
throws JAXBException, XPathBinderAssociationIsPartialException { return XmlUtils.getJAXBAssociationsForXPath(getBinder(), someJaxbElement, xpathExpr, refreshXmlFirst);
/** * 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); }
Binder<Node> binder = getBinder(); // do this first! return XmlUtils.getJAXBAssociationsForXPath(binder, getJaxbElement(), xpathExpr, refreshXmlFirst);
/** * Fetch JAXB Nodes matching an XPath (for example ".//w:p" - note the dot, * which is necessary for this sort of relative path). * * 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 someJaxbElement * @param refreshXmlFirst * @return * @throws JAXBException * @throws XPathBinderAssociationIsPartialException */ public List<Object> getJAXBNodesViaXPath(String xpathExpr, Object someJaxbElement, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException { return XmlUtils.getJAXBNodesViaXPath(getBinder(), someJaxbElement, xpathExpr, refreshXmlFirst); }
throws JAXBException, XPathBinderAssociationIsPartialException { return XmlUtils.getJAXBAssociationsForXPath(getBinder(), someJaxbElement, xpathExpr, refreshXmlFirst);
/** * 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); }
Binder<Node> binder = getBinder(); // do this first! return XmlUtils.getJAXBAssociationsForXPath(binder, getJaxbElement(), xpathExpr, refreshXmlFirst);