Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision daf544ac6a08ce2fc0f9bd2b07c70ea349a41e30)
+++ protocols/msn/ns.c	(revision d0752e8b08d37395fd036046552fa6b4fb92ac17)
@@ -683,5 +683,5 @@
 		char *psm_text = NULL;
 		
-		ubx = xt_from_string( msg );
+		ubx = xt_from_string( msg, msglen );
 		if( ubx && strcmp( ubx->name, "Data" ) == 0 &&
 		    ( psm = xt_find_node( ubx->children, "PSM" ) ) )
@@ -695,5 +695,5 @@
 		struct xt_node *adl, *d, *c;
 		
-		if( !( adl = xt_from_string( msg ) ) )
+		if( !( adl = xt_from_string( msg, msglen ) ) )
 			return 1;
 		
Index: protocols/msn/soap.c
===================================================================
--- protocols/msn/soap.c	(revision daf544ac6a08ce2fc0f9bd2b07c70ea349a41e30)
+++ protocols/msn/soap.c	(revision d0752e8b08d37395fd036046552fa6b4fb92ac17)
@@ -229,5 +229,5 @@
 	if( payload )
 	{
-		struct xt_node *xt = xt_from_string( payload );
+		struct xt_node *xt = xt_from_string( payload, 0 );
 		if( xt )
 			xt_print( xt );
Index: protocols/twitter/twitter_lib.c
===================================================================
--- protocols/twitter/twitter_lib.c	(revision daf544ac6a08ce2fc0f9bd2b07c70ea349a41e30)
+++ protocols/twitter/twitter_lib.c	(revision d0752e8b08d37395fd036046552fa6b4fb92ac17)
@@ -168,6 +168,5 @@
 {
 	static char *ret = NULL;
-	struct xt_parser *xp = NULL;
-	struct xt_node *node, *err;
+	struct xt_node *root, *node, *err;
 
 	g_free(ret);
@@ -175,8 +174,7 @@
 
 	if (req->body_size > 0) {
-		xp = xt_new(NULL, NULL);
-		xt_feed(xp, req->reply_body, req->body_size);
+		root = xt_from_string(req->reply_body, req->body_size);
 		
-		for (node = xp->root; node; node = node->next)
+		for (node = root; node; node = node->next)
 			if ((err = xt_find_node(node->children, "error")) && err->text_len > 0) {
 				ret = g_strdup_printf("%s (%s)", req->status_string, err->text);
@@ -184,5 +182,5 @@
 			}
 
-		xt_free(xp);
+		xt_free_node(root);
 	}
 
@@ -256,5 +254,5 @@
 {
 	struct im_connection *ic;
-	struct xt_parser *parser;
+	struct xt_node *parsed;
 	struct twitter_xml_list *txl;
 	struct twitter_data *td;
@@ -292,8 +290,7 @@
 
 	// Parse the data.
-	parser = xt_new(NULL, txl);
-	xt_feed(parser, req->reply_body, req->body_size);
-	twitter_xt_get_friends_id_list(parser->root, txl);
-	xt_free(parser);
+	parsed = xt_from_string(req->reply_body, req->body_size);
+	twitter_xt_get_friends_id_list(parsed, txl);
+	xt_free_node(parsed);
 
 	td->follow_ids = txl->list;
@@ -352,5 +349,5 @@
 	struct im_connection *ic = req->data;
 	struct twitter_data *td;
-	struct xt_parser *parser;
+	struct xt_node *parsed;
 	struct twitter_xml_list *txl;
 	GSList *l = NULL;
@@ -377,10 +374,9 @@
 
 	// Parse the data.
-	parser = xt_new(NULL, txl);
-	xt_feed(parser, req->reply_body, req->body_size);
+	parsed = xt_from_string(req->reply_body, req->body_size);
 
 	// Get the user list from the parsed xml feed.
-	twitter_xt_get_users(parser->root, txl);
-	xt_free(parser);
+	twitter_xt_get_users(parsed, txl);
+	xt_free_node(parsed);
 
 	// Add the users as buddies.
@@ -886,5 +882,5 @@
 	struct im_connection *ic = req->data;
 	struct twitter_data *td;
-	struct xt_parser *parser;
+	struct xt_node *parsed;
 	struct twitter_xml_list *txl;
 
@@ -913,9 +909,8 @@
 
 	// Parse the data.
-	parser = xt_new(NULL, txl);
-	xt_feed(parser, req->reply_body, req->body_size);
+	parsed = xt_from_string(req->reply_body, req->body_size);
 	// The root <statuses> node should hold the list of statuses <status>
-	twitter_xt_get_status_list(ic, parser->root, txl);
-	xt_free(parser);
+	twitter_xt_get_status_list(ic, parsed, txl);
+	xt_free_node(parsed);
 
 	td->home_timeline_obj = txl;
@@ -934,5 +929,5 @@
 	struct im_connection *ic = req->data;
 	struct twitter_data *td;
-	struct xt_parser *parser;
+	struct xt_node *parsed;
 	struct twitter_xml_list *txl;
 
@@ -961,9 +956,8 @@
 
 	// Parse the data.
-	parser = xt_new(NULL, txl);
-	xt_feed(parser, req->reply_body, req->body_size);
+	parsed = xt_from_string(req->reply_body, req->body_size);
 	// The root <statuses> node should hold the list of statuses <status>
-	twitter_xt_get_status_list(ic, parser->root, txl);
-	xt_free(parser);
+	twitter_xt_get_status_list(ic, parsed, txl);
+	xt_free_node(parsed);
 
 	td->mentions_obj = txl;
@@ -999,15 +993,13 @@
 
 	if (req->body_size > 0) {
-		struct xt_parser *xp = NULL;
-		struct xt_node *node;
-
-		xp = xt_new(NULL, NULL);
-		xt_feed(xp, req->reply_body, req->body_size);
-
-		if ((node = xt_find_node(xp->root, "status")) &&
+		struct xt_node *parsed, *node;
+
+		parsed = xt_from_string(req->reply_body, req->body_size);
+
+		if ((node = xt_find_node(parsed, "status")) &&
 		    (node = xt_find_node(node->children, "id")) && node->text)
 			td->last_status_id = g_ascii_strtoull(node->text, NULL, 10);
 
-		xt_free(xp);
+		xt_free_node(parsed);
 	}
 }
