Index: gst/gstpad.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstpad.c,v
retrieving revision 1.515
diff -u -r1.515 gstpad.c
--- gst/gstpad.c	12 Jun 2006 09:28:35 -0000	1.515
+++ gst/gstpad.c	20 Jun 2006 22:56:46 -0000
@@ -3024,6 +3024,18 @@
 
   xmlNewChild (parent, NULL, (xmlChar *) "name",
       (xmlChar *) GST_PAD_NAME (pad));
+   
+  if (GST_PAD_IS_SRC (pad)) {
+    xmlNewChild (parent, NULL, (xmlChar *) "direction",
+      (xmlChar *) "source");
+  } else if (GST_PAD_IS_SINK (pad)) {
+    xmlNewChild (parent, NULL, (xmlChar *) "direction",
+      (xmlChar *) "sink");
+  } else {
+    xmlNewChild (parent, NULL, (xmlChar *) "direction",
+      (xmlChar *) "unknown");
+  }
+  
   if (GST_PAD_PEER (pad) != NULL) {
     gchar *content;
 
