 
      - returns: A CollectionStatus structure.
      */
-    public static func deserialize(node: XMLIndexer) throws -> CollectionStatus {
-        guard let owned = node.element?.attributes["own"],
-            let prevOwned = node.element?.attributes["prevowned"],
-            let wantToBuy = node.element?.attributes["wanttobuy"],
-            let wantToPlay = node.element?.attributes["wanttoplay"],
-            let preOrdered = node.element?.attributes["preordered"],
-            let wantInTrade = node.element?.attributes["want"],
-            let forTrade = node.element?.attributes["fortrade"],
-            let wishList = node.element?.attributes["wishlist"],
-            let lastModified = node.element?.attributes["lastmodified"]
-                else { throw XMLDeserializationError.NodeIsInvalid(node: node)
-        }
-
-        var wishListPriority: Int?
-
-        // Wish List Priority is only there if the item is on the wishlist.
-        if let wishListPriorityStr = node.element?.attributes["wishlistpriority"] {
-            wishListPriority = Int(wishListPriorityStr)
-        }
-
-        return CollectionStatus(
-            owned: owned == "1",
-            prevOwned: prevOwned == "1",
-            wantToBuy: wantToBuy == "1",
-            wantToPlay: wantToPlay == "1",
-            preOrdered: preOrdered == "1",
-            wantInTrade: wantInTrade == "1",
-            forTrade: forTrade == "1",
-            wishList: wishList == "1",
-            wishListPriority: wishListPriority,
-            lastModified: lastModified)
+    public static func deserialize(element: XMLElement) throws -> CollectionStatus {
+        return try CollectionStatus(
+            owned: element.attribute("own"),
+            prevOwned: element.attribute("prevowned"),
+            wantToBuy: element.attribute("wanttobuy"),
+            wantToPlay: element.attribute("wanttoplay"),
+            preOrdered: element.attribute("preordered"),
+            wantInTrade: element.attribute("want"),
+            forTrade: element.attribute("fortrade"),
+            wishList: element.attribute("wishlist"),
+            wishListPriority: element.attribute("wishlistpriority"),
+            lastModified: element.attribute("lastmodified")
+        )
     }
 }
 

    }
}

extension CollectionStatus: XMLIndexerDeserializable {

    /**
     Deserializes a "status" indexer in BoardGameGeek "collection" response.

     - returns: A CollectionBoardGame structure.
     */
    public static func deserialize(node: XMLIndexer) throws -> CollectionBoardGame {
        guard node.element != nil && node["name"].element != nil else {
            throw XMLDeserializationError.NodeIsInvalid(node: node)
        }

        return try CollectionBoardGame(
            objectId: node.element!.attribute("objectid"),
            name: node["name"].value(),
            sortIndex: node["name"].element!.attribute("sortindex"),
            status: node["status"].value(),
            stats: node["stats"].value(),
            yearPublished: node["yearpublished"].value(),
