/** This function inserts text into a Node and invokes * a method to fix-up all other Ranges. */ void insertData(CharacterData node, int index, String insert) { fInsertNode = node; node.insertData( index, insert); fInsertNode = null; }
/** This function inserts text into a Node and invokes * a method to fix-up all other Ranges. */ void insertData(CharacterData node, int index, String insert) { fInsertNode = node; node.insertData( index, insert); fInsertNode = null; }
/** This function inserts text into a Node and invokes * a method to fix-up all other Ranges. */ void insertData(CharacterData node, int index, String insert) { fInsertNode = node; node.insertData( index, insert); fInsertNode = null; }
/** * @since SAAJ 1.2 * @param offset * @param arg * @throws DOMException */ public void insertData(int offset, String arg)throws DOMException { textRep.insertData(offset, arg); }
/** * Insert a string at the specified 16-bit unit offset. * * @param offset The character offset at which to insert. * @param data The <code>DOMString</code> to insert. * @throws DOMException INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is negative * or greater than the number of 16-bit units in <code>data</code>. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. */ public void insertData(int offset, String data) throws DOMException { target.insertData(offset, data); }
/** * @since SAAJ 1.2 * @param offset * @param arg * @throws DOMException */ public void insertData(int offset, String arg)throws DOMException { textRep.insertData(offset, arg); }
/** * Insert a string at the specified 16-bit unit offset. * * @param offset The character offset at which to insert. * @param data The <code>DOMString</code> to insert. * @throws DOMException INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is negative * or greater than the number of 16-bit units in <code>data</code>. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. */ public void insertData(int offset, String data) throws DOMException { target.insertData(offset, data); }
/** * @since SAAJ 1.2 * @param offset * @param arg * @throws DOMException */ public void insertData(int offset, String arg)throws DOMException { textRep.insertData(offset, arg); }
@Override public void insertData(int offset, String arg) throws DOMException { domNode.insertData(offset, arg); }
public void insertData(int offset, String arg) throws DOMException { try { _delegate.insertData(offset, arg); } catch (org.w3c.dom.DOMException ex) { throw wrap(ex); } }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("address"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); { boolean success = false; try { child.insertData(40, "ABC"); } catch (DOMException ex) { success = (ex.code == DOMException.INDEX_SIZE_ERR); } assertTrue("throw_INDEX_SIZE_ERR", success); } } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("address"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); { boolean success = false; try { child.insertData(-5, "ABC"); } catch (DOMException ex) { success = (ex.code == DOMException.INDEX_SIZE_ERR); } assertTrue("throws_INDEX_SIZE_ERR", success); } } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("name"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(9, "Ann "); childData = child.getData(); assertEquals("characterdataInsertDataMiddleAssert", "Margaret Ann Martin", childData); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("name"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(0, "Mss. "); childData = child.getData(); assertEquals("characterdataInsertDataBeginningAssert", "Mss. Margaret Martin", childData); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("hc_staff", true); elementList = doc.getElementsByTagName("strong"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(15, ", Esquire"); childData = child.getData(); assertEquals("characterdataInsertDataEndAssert", "Margaret Martin, Esquire", childData); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("name"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(15, ", Esquire"); childData = child.getData(); assertEquals("characterdataInsertDataEndAssert", "Margaret Martin, Esquire", childData); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("hc_staff", true); elementList = doc.getElementsByTagName("strong"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(9, "Ann "); childData = child.getData(); assertEquals("characterdataInsertDataMiddleAssert", "Margaret Ann Martin", childData); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String childData; doc = (Document) load("hc_staff", true); elementList = doc.getElementsByTagName("strong"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.insertData(0, "Mss. "); childData = child.getData(); assertEquals("characterdataInsertDataBeginningAssert", "Mss. Margaret Martin", childData); } /**
((CharacterData) /*Node */entElementContent).insertData(1, "newArg"); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList genderList; Node genderNode; CharacterData entText; EntityReference entReference; doc = (Document) load("staff", true); genderList = doc.getElementsByTagName("gender"); genderNode = genderList.item(2); entReference = doc.createEntityReference("ent3"); assertNotNull("createdEntRefNotNull", entReference); entText = (CharacterData) entReference.getFirstChild(); assertNotNull("entTextNotNull", entText); { boolean success = false; try { entText.insertData(1, "newArg"); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR); } assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR", success); } } /**