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;
+}
diff --git a/ndn-cpp/c/encoding/BinaryXMLEncoder.h b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
index e606dee..8c5047c 100644
--- a/ndn-cpp/c/encoding/BinaryXMLEncoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
@@ -8,11 +8,15 @@
 #define	NDN_BINARYXMLENCODER_H
 
 #include "../util/DynamicUCharArray.h"
+#include "BinaryXML.h"
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
+/** An ndn_BinaryXMLEncoder struct is used by all the encoding functions.  You should initialize it with
+ *  ndn_BinaryXMLEncoder_init.
+ */
 struct ndn_BinaryXMLEncoder {
   struct ndn_DynamicUCharArray output; /**< receives the encoded output */
   unsigned int offset;             /**< the offset into output.array for the next encoding */
@@ -28,14 +32,59 @@
  */
 static inline void ndn_BinaryXMLEncoder_init
   (struct ndn_BinaryXMLEncoder *self, unsigned char *outputArray, unsigned int outputArrayLength, 
-   unsigned char (*reallocFunction)(unsigned char *, unsigned int)) 
+   unsigned char * (*reallocFunction)(unsigned char *, unsigned int)) 
 {
   ndn_DynamicUCharArray_init(&self->output, outputArray, outputArrayLength, reallocFunction);
   self->offset = 0;
 }
 
+/**
+ * Encode a header with the type and value and write it to self->output.
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param type the header type
+ * @param value the header value
+ * @return 0 for success, else an error string
+ */
 char *ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value);
 
+/**
+ * Write an element start header using DTAG with the tag to self->output.
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param tag the DTAG tag
+ * @return 0 for success, else an error string
+ */
+static inline char *ndn_BinaryXMLEncoder_writeElementStartDTag(struct ndn_BinaryXMLEncoder *self, unsigned int tag) 
+{
+  return ndn_BinaryXMLEncoder_encodeTypeAndValue(self, ndn_BinaryXML_DTAG, tag);
+}
+
+/**
+ * Write an element close to self->output.
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @return 0 for success, else an error string
+ */
+char *ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self);
+
+/**
+ * Write a BLOB header, then the bytes of the blob value to self->output.
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param value an array of bytes for the blob value
+ * @param valueLength the length of the array
+ * @return 0 for success, else an error string
+ */
+char *ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength);
+
+/**
+ * Write an element start header using DTAG with the tag to self->output, then the blob, then an element close.
+ * (If you want to just write the blob, use ndn_BinaryXMLEncoder_writeBlob .)
+ * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param tag the DTAG tag
+ * @param value an array of bytes for the blob value
+ * @param valueLength the length of the array
+ * @return 0 for success, else an error string
+ */
+char *ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength);
+
 #ifdef	__cplusplus
 }
 #endif
