if (name.equals(elementName)) {
element = factory.create(name, (isEmpty) ? CommentElementFactory.IS_EMPTY : CommentElementFactory.IS_START);
// set attributes
String attrName = scanner.nextName();
while (attrName != null) {
String attrValue = scanner.nextValue();
Attr attr = document.createAttribute(attrName);
if (attr != null) {
if (attrValue != null)
((IDOMAttr) attr).setValueSource(attrValue);
element.setAttributeNode(attr);