Fix tinyxml2 attribute queries; add filename argument