diff --git a/ndn-cpp/c/encoding/BinaryXMLEncoder.c b/ndn-cpp/c/encoding/BinaryXMLEncoder.c
index c70a44a..c8a55f5 100644
--- a/ndn-cpp/c/encoding/BinaryXMLEncoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLEncoder.c
@@ -4,6 +4,7 @@
  * BSD license, See the LICENSE file for more information.
  */
 
+#include "../util/ndn_memory.h"
 #include "BinaryXML.h"
 #include "BinaryXMLEncoder.h"
 
@@ -14,6 +15,26 @@
 };
 
 /**
+ * Call ndn_DynamicUCharArray_ensureLength to ensure that there is enough room in the output, and copy
+ * array to the output.  This does not write a header.
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param array the array to copy
+ * @param arrayLength the length of the array
+ * @return 0 for success, else an error string
+ */
+static char *writeArray(struct ndn_BinaryXMLEncoder *self, unsigned char *array, unsigned int arrayLength)
+{
+  char *error;
+  if (error = ndn_DynamicUCharArray_ensureLength(&self->output, self->offset + arrayLength))
+    return error;
+  
+  ndn_memcpy(self->output.array + self->offset, array, arrayLength);
+	self->offset += arrayLength;
+  
+  return 0;
+}
+
+/**
  * Return the number of bytes to encode a header of value x.
  */
 static unsigned int getNEncodingBytes(unsigned int x) 
@@ -72,3 +93,42 @@
   
   return 0;
 }
+
+char *ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self)
+{
+  char *error;
+  if (error = ndn_DynamicUCharArray_ensureLength(&self->output, self->offset + 1))
+    return error;
+  
+	self->output.array[self->offset] = ndn_BinaryXML_CLOSE;
+	self->offset += 1;
+  
+  return 0;
+}
+
+char *ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength)
+{
+  char *error;
+  if (error = ndn_BinaryXMLEncoder_encodeTypeAndValue(self, ndn_BinaryXML_BLOB, valueLength))
+    return error;
+  
+  if (error = writeArray(self, value, valueLength))
+    return error;
+  
+  return 0;
+}
+
+char *ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength)
+{
+  char *error;
+  if (error = ndn_BinaryXMLEncoder_writeElementStartDTag(self, tag))
+    return error;
+  
+  if (error = ndn_BinaryXMLEncoder_writeBlob(self, value, valueLength))
+    return error;  
+  
+  if (error = ndn_BinaryXMLEncoder_writeElementClose(self))
+    return error;
+  
+  return 0;
+}
