}
}
- push_state(node, atts.getValue("type"), mode);
+ const char *type = atts.getValue("type");
+ if (type)
+ node->clearValue();
+ push_state(node, type, mode);
}
}
}
// If there are children, write them next.
- if (nChildren > 0 || node->isAlias()) {
+ if (nChildren > 0) {
doIndent(output, indent);
output << '<' << name;
writeAtts(output, node);
retval = false;
break;
default:
+ if (in->isAlias())
+ break;
string message = "Unknown internal SGPropertyNode type";
message += in->getType();
throw sg_error(message, "SimGear Property Reader");
}
}
+ // copy the attributes.
+ out->setAttributes( in->getAttributes() );
+
// Next, copy the children.
int nChildren = in->nChildren();
for (int i = 0; i < nChildren; i++) {