private static Node findNode(XPathExpression expr, Object context) throws ParserException { try { return (Node) expr.evaluate(context, XPathConstants.NODE); } catch (XPathException e) { throw new ParserException("Unable to find node", -1, e); } }
private static NodeList findNodes(XPathExpression expr, Object context) throws ParserException { try { return (NodeList) expr.evaluate(context, XPathConstants.NODESET); } catch (XPathException e) { throw new ParserException("Unable to find nodes", -1, e); } }
private static Node findNode(XPathExpression expr, Object context) throws ParserException { try { return (Node) expr.evaluate(context, XPathConstants.NODE); } catch (XPathException e) { throw new ParserException("Unable to find node", -1, e); } }
private static Node findNode(XPathExpression expr, Object context) throws ParserException { try { return (Node) expr.evaluate(context, XPathConstants.NODE); } catch (XPathException e) { throw new ParserException("Unable to find node", -1, e); } }
private static NodeList findNodes(XPathExpression expr, Object context) throws ParserException { try { return (NodeList) expr.evaluate(context, XPathConstants.NODESET); } catch (XPathException e) { throw new ParserException("Unable to find nodes", -1, e); } }
private static NodeList findNodes(XPathExpression expr, Object context) throws ParserException { try { return (NodeList) expr.evaluate(context, XPathConstants.NODESET); } catch (XPathException e) { throw new ParserException("Unable to find nodes", -1, e); } }
private static Node findNode(XPathExpression expr, Object context) throws ParserException { try { return (Node) expr.evaluate(context, XPathConstants.NODE); } catch (XPathException e) { throw new ParserException("Unable to find node", -1, e); } }
private static NodeList findNodes(XPathExpression expr, Object context) throws ParserException { try { return (NodeList) expr.evaluate(context, XPathConstants.NODESET); } catch (XPathException e) { throw new ParserException("Unable to find nodes", -1, e); } }
private static Node findNode(XPathExpression expr, Object context) throws ParserException { try { return (Node) expr.evaluate(context, XPathConstants.NODE); } catch (XPathException e) { throw new ParserException("Unable to find node", -1, e); } }
private static String getTextContent(Element element) throws ParserException { try { String content = element.getFirstChild().getNodeValue(); if (content != null) { return content.trim().replaceAll("\\s+", " "); } return null; } catch (DOMException e) { throw new ParserException("Unable to get text content for element " + element.getNodeName(), -1, e); } }
private static String getTextContent(Element element) throws ParserException { try { String content = element.getFirstChild().getNodeValue(); if (content != null) { return content.trim().replaceAll("\\s+", " "); } return null; } catch (DOMException e) { throw new ParserException("Unable to get text content for element " + element.getNodeName(), -1, e); } }
private static String getTextContent(Element element) throws ParserException { try { String content = element.getFirstChild().getNodeValue(); if (content != null) { return content.trim().replaceAll("\\s+", " "); } return null; } catch (DOMException e) { throw new ParserException("Unable to get text content for element " + element.getNodeName(), -1, e); } }
private static String getTextContent(Element element) throws ParserException { try { String content = element.getFirstChild().getNodeValue(); if (content != null) { return content.trim().replaceAll("\\s+", " "); } return content; } catch (DOMException e) { throw new ParserException("Unable to get text content for element " + element.getNodeName(), -1, e); } }
private static String getTextContent(Element element) throws ParserException { try { String content = element.getFirstChild().getNodeValue(); if (content != null) { return content.trim().replaceAll("\\s+", " "); } return null; } catch (DOMException e) { throw new ParserException("Unable to get text content for element " + element.getNodeName(), -1, e); } }
protected String getElementContent(final Element el) throws ParserException { try { return XmlUtil.getElementContent(el); } catch (Throwable t) { throw new ParserException(t.getMessage(), 0); } }
protected boolean isEmpty(final Element el) throws ParserException { try { return XmlUtil.isEmpty(el); } catch (Throwable t) { throw new ParserException(t.getMessage(), 0); } } }
protected Element[] getChildrenArray(final Node nd) throws ParserException { try { return XmlUtil.getElementsArray(nd); } catch (Throwable t) { throw new ParserException(t.getMessage(), 0); } }
protected Collection<Element> getChildren(final Node nd) throws ParserException { try { return XmlUtil.getElements(nd); } catch (Throwable t) { throw new ParserException(t.getMessage(), 0); } }
protected Element getOnlyChild(final Node nd) throws ParserException { try { return XmlUtil.getOnlyElement(nd); } catch (Throwable t) { throw new ParserException(t.getMessage(), 0); } }
private void processProperties(final Element el, final BuildState bs) throws ParserException { try { for (Element e: XmlUtil.getElements(el)) { processProperty(e, bs); } } catch (SAXException e) { throw new ParserException(e.getMessage(), 0, e); } }