/** * Format the string indicating the position (line number:offset)of the offset if * there is an exception. * @return java.lang.String indicating the line number and offset of the exception */ private String formatLineNumber() { return formatLineNumber(offset); }
/** * Format the string indicating the position (line number:offset)of the offset if * there is an exception. * @return java.lang.String indicating the line number and offset of the exception */ private String formatLineNumber() { return formatLineNumber(offset); }
/** * Format the string indicating the position (line number:offset)of the offset if * there is an exception. * @return java.lang.String indicating the line number and offset of the exception */ private String formatLineNumber() { return formatLineNumber(offset); }
throw new ParseException( "xmlns as a ns prefix can't be re-declared" +formatLineNumber(byte_offset)); throw new ParseException( "xmlns as a ns prefix can't be re-declared" +formatLineNumber(byte_offset)); } else { if (XMLDoc[byte_offset]== 0 && XMLDoc[byte_offset+1]=='x' throw new ParseException( "xmlns as a ns prefix can't be re-declared" +formatLineNumber(byte_offset));
private void handleOtherTextChar(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; if (!XMLChar.isValidChar(entityIdentifier())) throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } } else throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); }
private void handleOtherTextChar(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; if (!XMLChar.isValidChar(entityIdentifier())) throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } } else throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); }
private void handleOtherTextChar(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; if (!XMLChar.isValidChar(entityIdentifier())) throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } } else throw new ParseException( "Error in text content: Invalid char in text content " + formatLineNumber()); }
private void handleOtherTextChar2(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } //parser_state = STATE_TEXT; }else throw new ParseException( "Error in text content: Invalid char" + formatLineNumber()); } private int processElementTail(boolean helper) throws ParseException, EncodingException, EOFException{
private void handleOtherTextChar2(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } //parser_state = STATE_TEXT; }else throw new ParseException( "Error in text content: Invalid char" + formatLineNumber()); } private int processElementTail(boolean helper) throws ParseException, EncodingException, EOFException{
private void handleOtherTextChar2(int ch) throws ParseException{ if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); //parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseException( "Error in text content: ]]> in text content" + formatLineNumber()); } //parser_state = STATE_TEXT; }else throw new ParseException( "Error in text content: Invalid char" + formatLineNumber()); } private int processElementTail(boolean helper) throws ParseException, EncodingException, EOFException{
+formatLineNumber((int)currentElementRecord));
private int process_qm_seen()throws ParseException, EncodingException, EOFException { temp_offset = offset; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { //temp_offset = offset; if ((ch == 'x' || ch == 'X') && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') || r.skipChar('L'))) { ch = r.getChar(); if (ch == '?' || XMLChar.isSpaceChar(ch)) throw new ParseException( "Error in PI: [xX][mM][lL] not a valid PI targetname" + formatLineNumber()); offset = r.getPrevOffset(); } return STATE_PI_TAG; } throw new ParseException( "Other Error: First char after <? invalid" + formatLineNumber()); } private int process_start_doc()throws ParseException, EncodingException, EOFException {
private int process_qm_seen()throws ParseException, EncodingException, EOFException { temp_offset = offset; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { //temp_offset = offset; if ((ch == 'x' || ch == 'X') && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') || r.skipChar('L'))) { ch = r.getChar(); if (ch == '?' || XMLChar.isSpaceChar(ch)) throw new ParseException( "Error in PI: [xX][mM][lL] not a valid PI targetname" + formatLineNumber()); offset = getPrevOffset(); } return STATE_PI_TAG; } throw new ParseException( "Other Error: First char after <? invalid" + formatLineNumber()); } private int process_start_doc()throws ParseException, EncodingException, EOFException {
private int process_qm_seen()throws ParseException, EncodingException, EOFException { temp_offset = offset; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { //temp_offset = offset; if ((ch == 'x' || ch == 'X') && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') || r.skipChar('L'))) { ch = r.getChar(); if (ch == '?' || XMLChar.isSpaceChar(ch)) throw new ParseException( "Error in PI: [xX][mM][lL] not a valid PI targetname" + formatLineNumber()); offset = getPrevOffset(); } return STATE_PI_TAG; } throw new ParseException( "Other Error: First char after <? invalid" + formatLineNumber()); } private int process_start_doc()throws ParseException, EncodingException, EOFException {
private int process_end_doc() throws ParseException, EncodingException, EOFException { int parser_state; ch = getCharAfterS(); /* eof exception should be thrown here for premature ending*/ if (ch == '<') { if (r.skipChar('?')) { /* processing instruction after end tag of root element*/ temp_offset = offset; parser_state = STATE_END_PI; return parser_state; } else if ( r.skipChar('!') && r.skipChar('-') && r.skipChar('-')) { // comments allowed after the end tag of the root element temp_offset = offset; parser_state = STATE_END_COMMENT; return parser_state; } } throw new ParseException( "Other Error: XML not terminated properly" + formatLineNumber()); }
private int process_end_doc() throws ParseException, EncodingException, EOFException { int parser_state; ch = getCharAfterS(); /* eof exception should be thrown here for premature ending*/ if (ch == '<') { if (r.skipChar('?')) { /* processing instruction after end tag of root element*/ temp_offset = offset; parser_state = STATE_END_PI; return parser_state; } else if ( r.skipChar('!') && r.skipChar('-') && r.skipChar('-')) { // comments allowed after the end tag of the root element temp_offset = offset; parser_state = STATE_END_COMMENT; return parser_state; } } throw new ParseException( "Other Error: XML not terminated properly" + formatLineNumber()); }
private int process_end_doc() throws ParseException, EncodingException, EOFException { int parser_state; ch = getCharAfterS(); /* eof exception should be thrown here for premature ending*/ if (ch == '<') { if (r.skipChar('?')) { /* processing instruction after end tag of root element*/ temp_offset = offset; parser_state = STATE_END_PI; return parser_state; } else if ( r.skipChar('!') && r.skipChar('-') && r.skipChar('-')) { // comments allowed after the end tag of the root element temp_offset = offset; parser_state = STATE_END_COMMENT; return parser_state; } } throw new ParseException( "Other Error: XML not terminated properly" + formatLineNumber()); }
throw new ParseException( "Error in XML decl: Premature ending" + formatLineNumber()); + formatLineNumber());
throw new ParseException( "Error in XML decl: Premature ending" + formatLineNumber()); + formatLineNumber());
throw new ParseException( "Error in XML decl: Premature ending" + formatLineNumber()); + formatLineNumber());