Implement encodeInterest.
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.cpp b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
index 3454545..a92237e 100644
--- a/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
@@ -46,6 +46,19 @@
   name.set(nameStruct);
 }
 
+void BinaryXMLWireFormat::encodeInterest(Interest &interest, vector<unsigned char> &output) 
+{
+  struct ndn_Interest interestStruct;
+  struct ndn_NameComponent components[100];
+  ndn_Interest_init(&interestStruct, components, sizeof(components) / sizeof(components[0]));
+  interest.get(interestStruct);
+
+  BinaryXMLEncoder encoder;
+  ndn_encodeBinaryXMLInterest(&interestStruct, encoder.getEncoder());
+     
+  encoder.appendTo(output);
+}
+
 void BinaryXMLWireFormat::decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength)
 {
   struct ndn_NameComponent components[100];
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
index 3a794c7..5b3d065 100644
--- a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
@@ -15,7 +15,7 @@
   virtual void encodeName(Name &name, std::vector<unsigned char> &output);
   virtual void decodeName(Name &name, const unsigned char *input, unsigned int inputLength);
 
-  //virtual void encodeInterest(Interest &interest, std::vector<unsigned char> &output);
+  virtual void encodeInterest(Interest &interest, std::vector<unsigned char> &output);
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
   
   static BinaryXMLWireFormat &instance() { return instance_; }