/** * Implementation of DOM TEXT Interface * ************************************************************* */ // Overriding the MessageElement Method, where it throws exeptions. public String getNodeValue() throws DOMException { return textRep.getNodeValue(); }
/** * Returns the the value of the immediate child of this <code>Node</code> * object if a child exists and its value is text. * * @return a <code>String</code> with the text of the immediate child of * this <code>Node</code> object if (1) there is a child and * (2) the child is a <code>Text</code> object; * <code>null</code> otherwise */ public String getValue() { return textRep.getNodeValue(); }
public String toString() { return textRep.getNodeValue(); }
/** * Returns the the value of the immediate child of this <code>Node</code> * object if a child exists and its value is text. * * @return a <code>String</code> with the text of the immediate child of * this <code>Node</code> object if (1) there is a child and * (2) the child is a <code>Text</code> object; * <code>null</code> otherwise */ public String getValue() { return textRep.getNodeValue(); }
/** * Implementation of DOM TEXT Interface * ************************************************************* */ // Overriding the MessageElement Method, where it throws exeptions. public String getNodeValue() throws DOMException { return textRep.getNodeValue(); }
/** * Implementation of DOM TEXT Interface * ************************************************************* */ // Overriding the MessageElement Method, where it throws exeptions. public String getNodeValue() throws DOMException { return textRep.getNodeValue(); }
/** * Returns the the value of the immediate child of this <code>Node</code> * object if a child exists and its value is text. * * @return a <code>String</code> with the text of the immediate child of * this <code>Node</code> object if (1) there is a child and * (2) the child is a <code>Text</code> object; * <code>null</code> otherwise */ public String getValue() { return textRep.getNodeValue(); }
public String toString() { return textRep.getNodeValue(); }
public String toString() { return textRep.getNodeValue(); }
/** * Retrieves whether this <CODE>Text</CODE> object * represents a comment. * @return <CODE>true</CODE> if this <CODE>Text</CODE> object is * a comment; <CODE>false</CODE> otherwise */ public boolean isComment() { String temp = textRep.getNodeValue().trim(); if(temp.startsWith("<!--") && temp.endsWith("-->")) return true; return false; }
/** * Retrieves whether this <CODE>Text</CODE> object * represents a comment. * @return <CODE>true</CODE> if this <CODE>Text</CODE> object is * a comment; <CODE>false</CODE> otherwise */ public boolean isComment() { String temp = textRep.getNodeValue().trim(); if(temp.startsWith("<!--") && temp.endsWith("-->")) return true; return false; }
/** * Retrieves whether this <CODE>Text</CODE> object * represents a comment. * @return <CODE>true</CODE> if this <CODE>Text</CODE> object is * a comment; <CODE>false</CODE> otherwise */ public boolean isComment() { String temp = textRep.getNodeValue().trim(); if(temp.startsWith("<!--") && temp.endsWith("-->")) return true; return false; }
(fieldentryText != null) && (fieldentryText.getNodeValue() != null) && (fieldentryText.getNodeValue().trim().length() > 0)) val = fieldentryText.getNodeValue();
if (prevTextChild != null) { CharacterData ptc = (CharacterData) prevTextChild; ptc.setData(ptc.getNodeValue() + child.getNodeValue()); node.removeChild(child); len--;
assertEqualsAutoCase("element", "childName", "em", childName); employeeIDNode = (CharacterData) firstC.getFirstChild(); employeeID = employeeIDNode.getNodeValue(); assertEquals("employeeID", "EMP0004", employeeID);
return textRep.getNodeValue();
/** * 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; String childValue; doc = (Document) load("hc_staff", true); elementList = doc.getElementsByTagName("strong"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.setNodeValue("Marilyn Martin"); childData = child.getData(); assertEquals("data", "Marilyn Martin", childData); childValue = child.getNodeValue(); assertEquals("value", "Marilyn Martin", childValue); } /**
/** * 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; String childValue; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("name"); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); child.setNodeValue("Marilyn Martin"); childData = child.getData(); assertEquals("data", "Marilyn Martin", childData); childValue = child.getNodeValue(); assertEquals("value", "Marilyn Martin", childValue); } /**
return textRep.getNodeValue();
return textRep.getNodeValue();