/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Element testAddr; Attr addrAttr; int nodeType; doc = (Document) load("hc_staff", false); elementList = doc.getElementsByTagName("acronym"); testAddr = (Element) elementList.item(0); addrAttr = testAddr.getAttributeNode("title"); nodeType = (int) addrAttr.getNodeType(); assertEquals("nodeAttrNodeTypeAssert1", 2, nodeType); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Element testAddr; Attr addrAttr; int nodeType; doc = (Document) load("staff", false); elementList = doc.getElementsByTagName("address"); testAddr = (Element) elementList.item(0); addrAttr = testAddr.getAttributeNode("domestic"); nodeType = (int) addrAttr.getNodeType(); assertEquals("nodeAttrNodeTypeAssert1", 2, nodeType); } /**
public String getAttributeType(int i) { return toStaxType(getAttribute(i).getNodeType()); }
public String getAttributeType(int i) { return toStaxType(getAttribute(i).getNodeType()); }
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = (Attr)next; if(next.getPrefix() != null && next.getPrefix().equals(XMLConstants.XMLNS)) {
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = next; if(next.getPrefix() != null && next.getPrefix().equals(javax.xml.XMLConstants.XMLNS_ATTRIBUTE)) {
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = next; if(next.getPrefix() != null && next.getPrefix().equals(javax.xml.XMLConstants.XMLNS_ATTRIBUTE)) {
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Attr newAttrNode; String attrValue; String attrName; int attrType; doc = (Document) load("hc_staff", true); newAttrNode = doc.createAttribute("title"); attrValue = newAttrNode.getNodeValue(); assertEquals("value", "", attrValue); attrName = newAttrNode.getNodeName(); assertEqualsAutoCase("attribute", "name", "title", attrName); attrType = (int) newAttrNode.getNodeType(); assertEquals("type", 2, attrType); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Attr newAttrNode; String attrValue; String attrName; int attrType; doc = (Document) load("staff", true); newAttrNode = doc.createAttribute("district"); attrValue = newAttrNode.getNodeValue(); assertEquals("value", "", attrValue); attrName = newAttrNode.getNodeName(); assertEquals("name", "district", attrName); attrType = (int) newAttrNode.getNodeType(); assertEquals("type", 2, attrType); } /**
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = (Attr)next; if(next.getPrefix() != null && next.getPrefix().equals(XMLConstants.XMLNS)) {
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = next; if(next.getPrefix() != null && next.getPrefix().equals(javax.xml.XMLConstants.XMLNS_ATTRIBUTE)) {
if(next.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attribute = next; if(next.getPrefix() != null && next.getPrefix().equals(javax.xml.XMLConstants.XMLNS_ATTRIBUTE)) {