/** * Removes content from the master XML document * It first calls getCurrentIndex() if the result is * a starting tag, then the entire element referred to * by the starting tag is removed * If the result is an attribute name or ns node, then * the corresponding attribute name/value pair is removed * If the token type is one of text, CDATA or commment, * then the entire node, including the starting and ending * delimiting text surrounding the content, is removed * */ public void remove() throws NavException,ModifyException{ int i = md.getCurrentIndex(); int type = md.getTokenType(i); if (type==VTDNav.TOKEN_STARTING_TAG){ long l = md.getElementFragment(); removeContent((int)l, (int)(l>>32)); } else if (type == VTDNav.TOKEN_ATTR_NAME || type==VTDNav.TOKEN_ATTR_NS){ removeAttribute(i); } else { removeToken(i); } }
/** * Removes content from the master XML document * It first calls getCurrentIndex() if the result is * a starting tag, then the entire element referred to * by the starting tag is removed * If the result is an attribute name or ns node, then * the corresponding attribute name/value pair is removed * If the token type is one of text, CDATA or commment, * then the entire node, including the starting and ending * delimiting text surrounding the content, is removed * */ public void remove() throws NavException,ModifyException{ int i = md.getCurrentIndex(); int type = md.getTokenType(i); if (type==VTDNav.TOKEN_STARTING_TAG){ long l = md.getElementFragment(); removeContent((int)l, (int)(l>>32)); } else if (type == VTDNav.TOKEN_ATTR_NAME || type==VTDNav.TOKEN_ATTR_NS){ removeAttribute(i); } else { removeToken(i); } }
/** * Removes content from the master XML document * It first calls getCurrentIndex() if the result is * a starting tag, then the entire element referred to * by the starting tag is removed * If the result is an attribute name or ns node, then * the corresponding attribute name/value pair is removed * If the token type is one of text, CDATA or commment, * then the entire node, including the starting and ending * delimiting text surrounding the content, is removed * */ public void remove() throws NavException,ModifyException{ int i = md.getCurrentIndex(); int type = md.getTokenType(i); if (type==VTDNav.TOKEN_STARTING_TAG){ long l = md.getElementFragment(); removeContent((int)l, (int)(l>>32)); } else if (type == VTDNav.TOKEN_ATTR_NAME || type==VTDNav.TOKEN_ATTR_NS){ removeAttribute(i); } else { removeToken(i); } }