Fix bug in getOutput: need to resize the vector to the actual encoding length.
diff --git a/ndn-cpp/encoding/binary-xml-encoder.hpp b/ndn-cpp/encoding/binary-xml-encoder.hpp
index 6c560b1..26cd932 100644
--- a/ndn-cpp/encoding/binary-xml-encoder.hpp
+++ b/ndn-cpp/encoding/binary-xml-encoder.hpp
@@ -28,10 +28,12 @@
   }
   
   /**
-   * Return the output as a shared_ptr.
+   * Resize the output vector to the correct encoding length and return.
+   * @return The encoding as a shared_ptr.  Assume that the caller now owns the vector.
    */
   const ptr_lib::shared_ptr<std::vector<unsigned char> > &getOutput() 
   {
+    output_.get()->resize(offset);
     return output_.get();
   }