// Set node name if it is a delegate node. This allows proper error
// message to be reported.
if (node instanceof DelegateNode)
{
DelegateNode propertyNode = (DelegateNode)node;
propertyNode.setName(localName);
}
// Set attributes on the current node
for (int i = 0; i < attributes.getLength(); i++)
{
String attributeURI = attributes.getURI(i);
if (attributeURI == null || attributeURI == "" || isFXGNamespace(attributeURI))
{
String attributeName = attributes.getLocalName(i);
String attributeValue = attributes.getValue(i);
node.setAttribute(attributeName, attributeValue, problems);
}
}
// Associate child with parent node (and handle any special
// relationships)
if (parent != null)
{
if (node instanceof DelegateNode)
{
DelegateNode propertyNode = (DelegateNode)node;
propertyNode.setDelegate(parent, problems);
}
else
{
parent.addChild(node, problems);
}