private void readCDATASection(/*@NotNull*/ FastStringBuffer cdata) throws XPathException { try { char c; // CDATA section c = t.nextChar(); expectChar(c, 'C'); c = t.nextChar(); expectChar(c, 'D'); c = t.nextChar(); expectChar(c, 'A'); c = t.nextChar(); expectChar(c, 'T'); c = t.nextChar(); expectChar(c, 'A'); c = t.nextChar(); expectChar(c, '['); while (!cdata.toString().endsWith("]]>")) { cdata.append(t.nextChar()); } cdata.setLength(cdata.length() - 3); } catch (StringIndexOutOfBoundsException err) { grumble("No closing ']]>' found for CDATA section"); } }
private void readCDATASection(/*@NotNull*/ FastStringBuffer cdata) throws XPathException { try { char c; // CDATA section c = t.nextChar(); expectChar(c, 'C'); c = t.nextChar(); expectChar(c, 'D'); c = t.nextChar(); expectChar(c, 'A'); c = t.nextChar(); expectChar(c, 'T'); c = t.nextChar(); expectChar(c, 'A'); c = t.nextChar(); expectChar(c, '['); while (!cdata.toString().endsWith("]]>")) { cdata.append(t.nextChar()); } cdata.setLength(cdata.length() - 3); } catch (StringIndexOutOfBoundsException err) { grumble("No closing ']]>' found for CDATA section"); } }
private Expression parseCommentConstructor() throws XPathException { try { char c = t.nextChar(); // XML-like comment expectChar(c, '-'); FastStringBuffer comment = new FastStringBuffer(FastStringBuffer.C256); while (!comment.toString().endsWith("--")) { comment.append(t.nextChar()); } if (t.nextChar() != '>') { grumble("'--' is not permitted in an XML comment"); } CharSequence commentText = comment.subSequence(0, comment.length() - 2); Comment instruction = new Comment(); instruction.setSelect(new StringLiteral(new StringValue(commentText))); setLocation(instruction); return instruction; } catch (StringIndexOutOfBoundsException err) { grumble("No closing '-->' found for comment constructor"); return null; } }
private Expression parseCommentConstructor() throws XPathException { try { char c = t.nextChar(); // XML-like comment expectChar(c, '-'); FastStringBuffer comment = new FastStringBuffer(FastStringBuffer.C256); while (!comment.toString().endsWith("--")) { comment.append(t.nextChar()); } if (t.nextChar() != '>') { grumble("'--' is not permitted in an XML comment"); } CharSequence commentText = comment.subSequence(0, comment.length() - 2); Comment instruction = new Comment(); instruction.setSelect(new StringLiteral(new StringValue(commentText))); setLocation(instruction); return instruction; } catch (StringIndexOutOfBoundsException err) { grumble("No closing '-->' found for comment constructor"); return null; } }
expectChar(c, '='); c = t.nextChar(); c = skipSpaces(c); expectChar(t.nextChar(), '>'); } else { readElementContent(elname, contents);
expectChar(c, '='); c = t.nextChar(); c = skipSpaces(c); expectChar(t.nextChar(), '>'); } else { readElementContent(elname, contents);