Returns a string representation of the attribute that is a well-formed XML attribute.
99100101102103104105106107108109
public void testGetExternalForm() { Attribute a1 = new Attribute("test", "value contains a \""); assertEquals("test=\"value contains a "\"", a1.toXML()); Attribute a2 = new Attribute("test", "value contains a '"); assertEquals("test=\"value contains a '\"", a2.toXML()); }
102103104105106107108109110111112
Attribute a1 = new Attribute("test", "value contains a \""); assertEquals("test=\"value contains a "\"", a1.toXML()); Attribute a2 = new Attribute("test", "value contains a '"); assertEquals("test=\"value contains a '\"", a2.toXML()); } public void testSetLocalName() {
693694695696697698699700701702703
public void testPunctuationCharactersInToXML() { String data = "=,.!@#$%^*()_-'[]{}+/?;:`|\\"; Attribute a = new Attribute("a", data); assertEquals("a=\"" + data + "\"", a.toXML()); } // Test for a bug that was caught by other tests; but not // sufficiently isolated by them
110111112113114115116117118119120
113114115116117118119120121122123
703704705706707708709710711712713