private void composeDoc(XhtmlDocument doc) throws IOException { // headers.... // dst.append("<html>" + (pretty ? "\r\n" : "")); for (XhtmlNode c : doc.getChildNodes()) writeNode(" ", c, false); // dst.append("</html>" + (pretty ? "\r\n" : "")); }
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) { try { n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement()); } catch (Exception e) { logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
private XhtmlDocument parse(String entryName) throws FHIRFormatError, IOException { XhtmlDocument result = new XhtmlDocument(); skipWhiteSpaceAndComments(result); if (peekChar() != '<') throw new FHIRFormatError("Unable to Parse HTML - does not start with tag. Found "+peekChar()+descLoc()); readChar(); markLocation(); QName n = new QName(readName().toLowerCase()); if ((entryName != null) && !n.getName().equals(entryName)) throw new FHIRFormatError("Unable to Parse HTML - starts with '"+n+"' not '"+entryName+"'"+descLoc()); XhtmlNode root = result.addTag(n.getName()); root.setLocation(markLocation()); parseAttributes(root); markLocation(); NSMap nsm = checkNamespaces(n, root, null, true); if (readChar() == '/') { if (peekChar() != '>') throw new FHIRFormatError("unexpected non-end of element "+n+" "+descLoc()); readChar(); } else { unwindPoint = null; List<XhtmlNode> p = new ArrayList<XhtmlNode>(); parseElementInner(root, p, nsm, true); } return result; }
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) { try { n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement()); } catch (Exception e) { logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
private XhtmlDocument parse(String entryName) throws FHIRFormatError, IOException { XhtmlDocument result = new XhtmlDocument(); skipWhiteSpaceAndComments(result); if (peekChar() != '<') throw new FHIRFormatError("Unable to Parse HTML - does not start with tag. Found "+peekChar()+descLoc()); readChar(); markLocation(); QName n = new QName(readName().toLowerCase()); if ((entryName != null) && !n.getName().equals(entryName)) throw new FHIRFormatError("Unable to Parse HTML - starts with '"+n+"' not '"+entryName+"'"+descLoc()); XhtmlNode root = result.addTag(n.getName()); root.setLocation(markLocation()); parseAttributes(root); markLocation(); NSMap nsm = checkNamespaces(n, root, null, true); if (readChar() == '/') { if (peekChar() != '>') throw new FHIRFormatError("unexpected non-end of element "+n+" "+descLoc()); readChar(); } else { unwindPoint = null; List<XhtmlNode> p = new ArrayList<XhtmlNode>(); parseElementInner(root, p, nsm, true); } return result; }
public XhtmlNode getDocumentElement() { for (XhtmlNode n : getChildNodes()) { if (n.getNodeType() == NodeType.Element) return n; } return null; } }
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) { try { n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement()); } catch (Exception e) { logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
protected XhtmlNode parseXhtml(String value) throws IOException, FHIRFormatError { XhtmlParser prsr = new XhtmlParser(); try { return prsr.parse(value, "div").getChildNodes().get(0); } catch (org.hl7.fhir.exceptions.FHIRFormatError e) { throw new FHIRFormatError(e.getMessage(), e); } }
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) { try { n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement()); } catch (Exception e) { logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
private void composeDoc(XhtmlDocument doc) throws IOException { // headers.... // dst.append("<html>" + (pretty ? "\r\n" : "")); for (XhtmlNode c : doc.getChildNodes()) writeNode(" ", c, false); // dst.append("</html>" + (pretty ? "\r\n" : "")); }
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) { try { n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement()); } catch (Exception e) { logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
public XhtmlNode getDocumentElement() { for (XhtmlNode n : getChildNodes()) { if (n.getNodeType() == NodeType.Element) return n; } return null; } }
protected XhtmlNode parseXhtml(String value) throws IOException, FHIRFormatError { XhtmlParser prsr = new XhtmlParser(); try { return prsr.parse(value, "div").getChildNodes().get(0); } catch (org.hl7.fhir.exceptions.FHIRFormatError e) { throw new FHIRFormatError(e.getMessage(), e); } }
protected XhtmlNode parseXhtml(String value) throws IOException, FHIRFormatError { XhtmlParser prsr = new XhtmlParser(); try { return prsr.parse(value, "div").getChildNodes().get(0); } catch (org.hl7.fhir.exceptions.FHIRFormatError e) { throw new FHIRFormatError(e.getMessage(), e); } }