String expectedXML = "<emp:Employee xmlns:emp=\"http://ec.org/software\" " +
"xmlns:attrNS=\"mailto:whoever@whatever.com\" attrNS:Attr2=\"Value 2\" " +
"attrNS:Attr3=\"Value 3\" attrNS:Attr1=\"Value 1\"\n" +
" attrNS:Attr5=\"Value 5\" attrNS:Attr4=\"Value 4\"></emp:Employee>";
OMFactory factory = OMAbstractFactory.getOMFactory();
QName elementQName = new QName("http://ec.org/software", "Employee", "emp");
OMNamespace attrNS = factory.createOMNamespace("mailto:whoever@whatever.com", "attrNS");
// add some attributes with namespaces
OMAttribute[] attribute = new OMAttribute[5];
for (int i = 0; i < 5; i++) {
attribute[i] = factory.createOMAttribute("Attr" + (i + 1), attrNS, "Value " + (i + 1));
}
String stringXML = getStringXML(ADBPullParser.createPullParser(elementQName, null, new Object[]{null, attribute}));
try {
Document actualDom = newDocument(stringXML);