diff --git a/xml-parser/xml-parser-tests.ts b/xml-parser/xml-parser-tests.ts
new file mode 100644
index 0000000000..81518cd28e
--- /dev/null
+++ b/xml-parser/xml-parser-tests.ts
@@ -0,0 +1,20 @@
+///
+///
+
+import assert = require('assert');
+import parse = require('xml-parser');
+
+var doc: parse.Document = parse(
+ '' +
+ 'foo');
+var declaration: parse.Declaration = doc.declaration;
+assert.equal(declaration.attributes['version'], '1.0');
+assert.equal(declaration.attributes['encoding'], 'utf-8');
+var root: parse.Node = doc.root;
+assert.equal(root.name, 'mydoc');
+var children: parse.Node[] = root.children;
+assert.equal(children.length, 2);
+var child1: parse.Node = children[0];
+assert.equal(child1.name, 'child');
+assert.equal(child1.attributes['a'], '1');
+assert.equal(child1.content, 'foo');
diff --git a/xml-parser/xml-parser.d.ts b/xml-parser/xml-parser.d.ts
new file mode 100644
index 0000000000..2bb25fc8f0
--- /dev/null
+++ b/xml-parser/xml-parser.d.ts
@@ -0,0 +1,33 @@
+// Type definitions for xml-parser 1.2.1
+// Project: https://github.com/segmentio/xml-parser
+// Definitions by: Matt Frantz
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module 'xml-parser' {
+
+ function parse(xml: string): parse.Document;
+
+ module parse {
+ export interface Document {
+ declaration: Declaration;
+ root: Node;
+ }
+
+ export interface Declaration {
+ attributes: Attributes;
+ }
+
+ export interface Node {
+ name: string;
+ attributes: Attributes;
+ children: Node[];
+ content?: string;
+ }
+
+ export interface Attributes {
+ [name: string]: string;
+ }
+ }
+
+ export = parse;
+}