anchor.diff:       end}.
   
   billionlaughs_test() ->
  -    Data =
  -	"<?xml version='1.0'?><!DOCTYPE test [ <!ENTITY lol \"lol\"> "
  -	"<!ENTITY lol1 \"&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;\"> "
  -	"<!ENTITY lol2 \"&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;\"> "
  -	"<!ENTITY lol3 \"&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;\"> "
  -	"<!ENTITY lol4 \"&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;\"> "
  -	"<!ENTITY lol5 \"&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;\"> "
  -	"<!ENTITY lol6 \"&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;\"> "
  -	"<!ENTITY lol7 \"&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;\"> "
  -	"<!ENTITY lol8 \"&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;\"> "
  -	"<!ENTITY lol9 \"&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;\"> "
  -	"] ><stream:stream xmlns='jabber:client' "
  -	"xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='&lol9;'>\n",
  +    Data = <<
  +	"<?xml version='1.0'?><!DOCTYPE test [ <!ENTITY lol \"lol\"> ",
  +	"<!ENTITY lol1 \"&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;\"> ",
  +	"<!ENTITY lol2 \"&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;\"> ",
  +	"<!ENTITY lol3 \"&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;\"> ",
  +	"<!ENTITY lol4 \"&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;\"> ",
  +	"<!ENTITY lol5 \"&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;\"> ",
  +	"<!ENTITY lol6 \"&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;\"> ",
  +	"<!ENTITY lol7 \"&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;\"> ",
  +	"<!ENTITY lol8 \"&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;\"> ",
  +	"<!ENTITY lol9 \"&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;\"> ",
  +	"] ><stream:stream xmlns='jabber:client' ",
  +	"xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='&lol9;'>\n">>,
       CallbackPid = spawn_link(fun() -> receiver([]) end),
       Stream0 = new(CallbackPid),
       Stream1 = xml_stream:parse(Stream0, Data),
  
positive.code: 	     Data = ["<root>", [[$<, Tag, "/>"] || Tag <- Tags], "</root>"],
  	     Els = #xmlel{name = <<"root">>,
  			  children = [#xmlel{name = Tag} || Tag <- Tags]},
  	     ?assertEqual(Els, xml_stream:parse_element(Data))
       end}.
  
  many_stream_elements_test_() ->
  
negative.code:     ?assertEqual(true, exit(CallbackPid, kill)),
      ?assertEqual(false, is_process_alive(CallbackPid)),
      Stream0 = new(CallbackPid),
      Stream1 = xml_stream:parse(Stream0, <<"<root><a/></root>">>),
      close(Stream1).
  
  huge_element_test_() ->
  