diff --git a/ndn-cpp/encoding/BinaryXMLDecoder.c b/ndn-cpp/encoding/BinaryXMLDecoder.c
index 2e4e103..89f6a9c 100644
--- a/ndn-cpp/encoding/BinaryXMLDecoder.c
+++ b/ndn-cpp/encoding/BinaryXMLDecoder.c
@@ -31,7 +31,7 @@
   return (char *)0;
 }
 
-char *ndn_BinaryXMLDecoder_readDTag(struct ndn_BinaryXMLDecoder *self, unsigned int tag)
+char *ndn_BinaryXMLDecoder_readDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag)
 {
   char *error;
   unsigned int type;
@@ -42,8 +42,41 @@
   if (type != ndn_BinaryXML_DTAG)
     return "ndn_BinaryXMLDecoder_readDTag: header type is not a DTAG";
   
-  if (value != tag)
+  if (value != expectedTag)
     return "ndn_BinaryXMLDecoder_readDTag: did not get the expected DTAG";
   
   return (char *)0;
+}
+
+char *ndn_BinaryXMLDecoder_readElementClose(struct ndn_BinaryXMLDecoder *self)
+{
+  if (self->offset >= self->inputLength)
+    return "ndn_BinaryXMLDecoder_readElementClose read past the end of the input";
+  
+  unsigned int octet = (unsigned int)(self->input[self->offset++] & 0xff);
+
+  if (octet != ndn_BinaryXML_CLOSE)
+    return "ndn_BinaryXMLDecoder_readDTag: did not get the expected element close";
+  
+  return (char *)0;
+}
+
+char *ndn_BinaryXMLDecoder_peekDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int *gotExpectedTag)
+{
+  // Default to 0.
+  *gotExpectedTag = 0;
+  
+  unsigned int type;
+  unsigned int value;
+  unsigned int saveOffset = self->offset;
+  char *error = ndn_BinaryXMLDecoder_decodeTypeAndValue(self, &type, &value);
+  self->offset = saveOffset;
+  
+  if (error)
+    return error;
+  
+  if (type == ndn_BinaryXML_DTAG && value == expectedTag)
+    *gotExpectedTag = 1;
+  
+  return (char *)0;
 }
\ No newline at end of file
