diff --git a/Cargo.toml b/Cargo.toml
index a9c3ba08d1bd100099e11fcccd3d80f0ecb0480d..3bf0c4b5f234ab53216f9c2eb3eaf20b767b77d3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,5 +18,8 @@ name = "example"
 path = "examples/main.rs"
 
 [dependencies]
-flate2 = "~0.0.3"
-rust-xml = "~0.1.1"
+flate2 = "*"
+
+[dependencies.xml-rs]
+git = "https://github.com/netvl/xml-rs.git"
+
diff --git a/src/lib.rs b/src/lib.rs
index 0c2641f22ef0f310e4c0b8562307ba7e0566347a..65ba7335a84e18d012c9bd17899e3e50777aa49a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,7 +8,7 @@ use std::str::FromStr;
 use std::collections::HashMap;
 use xml::reader::EventReader;
 use xml::reader::events::XmlEvent::*;
-use xml::common::Attribute;
+use xml::attribute::OwnedAttribute;
 use serialize::base64::{FromBase64, FromBase64Error};
 use flate2::reader::ZlibDecoder;
 use std::num::from_str_radix;
@@ -115,7 +115,7 @@ pub type Properties = HashMap<String, String>;
 fn parse_properties<B: Buffer>(parser: &mut EventReader<B>) -> Result<Properties, TiledError> {
     let mut p = HashMap::new();
     parse_tag!(parser, "properties",
-               "property" => |attrs:Vec<Attribute>| {
+               "property" => |attrs:Vec<OwnedAttribute>| {
                     let ((), (k, v)) = get_attrs!(
                         attrs,
                         optionals: [],
@@ -145,7 +145,7 @@ pub struct Map {
 }
 
 impl Map {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>) -> Result<Map, TiledError>  {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>) -> Result<Map, TiledError>  {
         let (c, (v, o, w, h, tw, th)) = get_attrs!(
             attrs, 
             optionals: [("backgroundcolor", colour, |v:String| from_str(v[]))], 
@@ -234,7 +234,7 @@ pub struct Tileset {
 }
 
 impl Tileset {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>) -> Result<Tileset, TiledError> {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>) -> Result<Tileset, TiledError> {
         let ((s, m), (g, n, w, h)) = get_attrs!(
            attrs,
            optionals: [("spacing", spacing, |v:String| from_str(v[])),
@@ -270,7 +270,7 @@ pub struct Image {
 }
 
 impl Image {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>) -> Result<Image, TiledError> {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>) -> Result<Image, TiledError> {
         let (c, (s, w, h)) = get_attrs!(
             attrs,
             optionals: [("trans", trans, |v:String| from_str(v[]))],
@@ -296,7 +296,7 @@ pub struct Layer {
 }
 
 impl Layer {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>, width: u32) -> Result<Layer, TiledError> {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>, width: u32) -> Result<Layer, TiledError> {
         let ((o, v), n) = get_attrs!(
             attrs,
             optionals: [("opacity", opacity, |v:String| from_str(v[])),
@@ -329,7 +329,7 @@ pub struct ObjectGroup {
 }
 
 impl ObjectGroup {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>) -> Result<ObjectGroup, TiledError> {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>) -> Result<ObjectGroup, TiledError> {
         let ((o, v, c), n) = get_attrs!(
             attrs,
             optionals: [("opacity", opacity, |v:String| from_str(v[])),
@@ -359,7 +359,7 @@ pub enum Object {
 }
 
 impl Object {
-    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>) -> Result<Object, TiledError> {
+    fn new<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>) -> Result<Object, TiledError> {
         let ((w, h, v), (x, y)) = get_attrs!(
             attrs,
             optionals: [("width", width, |v:String| from_str(v[])),
@@ -400,7 +400,7 @@ impl Object {
         }
     }
 
-    fn new_polyline(x: int, y: int, v: bool, attrs: Vec<Attribute>) -> Result<Object, TiledError> {
+    fn new_polyline(x: int, y: int, v: bool, attrs: Vec<OwnedAttribute>) -> Result<Object, TiledError> {
         let ((), s) = get_attrs!(
             attrs,
             optionals: [],
@@ -410,7 +410,7 @@ impl Object {
        Ok(Object::Polyline {x: x, y: y, points: points, visible: v})
     }
 
-    fn new_polygon(x: int, y: int, v: bool, attrs: Vec<Attribute>) -> Result<Object, TiledError> {
+    fn new_polygon(x: int, y: int, v: bool, attrs: Vec<OwnedAttribute>) -> Result<Object, TiledError> {
         let ((), s) = get_attrs!(
             attrs,
             optionals: [],
@@ -438,7 +438,7 @@ impl Object {
     }
 }
 
-fn parse_data<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<Attribute>, width: u32) -> Result<Vec<Vec<u32>>, TiledError> {
+fn parse_data<B: Buffer>(parser: &mut EventReader<B>, attrs: Vec<OwnedAttribute>, width: u32) -> Result<Vec<Vec<u32>>, TiledError> {
     let ((), (e, c)) = get_attrs!(
         attrs,
         optionals: [],