diff --git a/src/encoding/binary-xml-wire-format.cpp b/src/encoding/binary-xml-wire-format.cpp
index e463e91..73d8fd6 100644
--- a/src/encoding/binary-xml-wire-format.cpp
+++ b/src/encoding/binary-xml-wire-format.cpp
@@ -20,6 +20,204 @@
 
 namespace ndn {
 
+namespace c {
+
+class Exclude : public ndn::Exclude
+{
+public:
+  void
+  get(struct ndn_Exclude& excludeStruct) const
+  {
+    if (excludeStruct.maxEntries < size())
+      throw runtime_error("excludeStruct.maxEntries must be >= this exclude getEntryCount()");
+
+    int entries = 0;
+    for (Exclude::const_reverse_iterator i = rbegin (); i != rend (); i++)
+      {
+        if (!i->first.empty())
+          {
+            excludeStruct.entries[entries].type = ndn_Exclude_COMPONENT;
+            excludeStruct.entries[entries].component.value.value = const_cast<uint8_t*>(i->first.getValue().buf());
+            excludeStruct.entries[entries].component.value.length = i->first.getValue().size();
+            ++entries;
+          }
+        if (i->second)
+          {
+            excludeStruct.entries[entries].type = ndn_Exclude_ANY;
+            ++entries;
+          }
+      }
+
+    excludeStruct.nEntries = entries;
+  }
+
+  void
+  set(const struct ndn_Exclude& excludeStruct)
+  {
+    clear();
+
+    if (excludeStruct.nEntries == 0)
+      return;
+
+    int i = 0;
+    if (excludeStruct.entries[i].type == ndn_Exclude_ANY) {
+      appendExclude("/", true);
+      i++;
+    }
+
+    while (i < excludeStruct.nEntries) {
+      ndn_ExcludeEntry *entry = &excludeStruct.entries[i];
+
+      if (entry->type != ndn_Exclude_COMPONENT)
+        throw runtime_error("unrecognized ndn_ExcludeType");
+
+      Name::Component excludedComponent (entry->component.value.value, entry->component.value.length);
+      ++i;
+      entry = &excludeStruct.entries[i];
+
+      if (i < excludeStruct.nEntries) {
+        if (entry->type == ndn_Exclude_ANY) {
+          appendExclude(excludedComponent, true);
+          ++i;
+        }
+        else
+          appendExclude(excludedComponent, false);
+      }
+      else
+        appendExclude(excludedComponent, false);
+    }
+  }
+};
+
+class Name : public ndn::Name
+{
+public:
+  void 
+  get(struct ndn_Name& nameStruct) const
+  {
+    if (nameStruct.maxComponents < size())
+      throw runtime_error("nameStruct.maxComponents must be >= this name getNComponents()");
+  
+    nameStruct.nComponents = size();
+    for (size_t i = 0; i < nameStruct.nComponents; ++i) {
+      nameStruct.components[i].value.value = const_cast<uint8_t*>(ndn::Name::get(i).getValue().buf());
+      nameStruct.components[i].value.length = ndn::Name::get(i).getValue().size();
+    }
+  }
+  
+  void 
+  set(const struct ndn_Name& nameStruct) 
+  {
+    clear();
+    for (size_t i = 0; i < nameStruct.nComponents; ++i)
+      append(nameStruct.components[i].value.value, nameStruct.components[i].value.length);  
+  }
+};
+
+class Interest : public ndn::Interest
+{
+public:
+  void 
+  get(struct ndn_Interest& interestStruct) const 
+  {
+    reinterpret_cast<const c::Name&>(getName()).get(interestStruct.name);
+    interestStruct.minSuffixComponents = getMinSuffixComponents();
+    interestStruct.maxSuffixComponents = getMaxSuffixComponents();
+    // publisherPublicKeyDigest_.get(interestStruct.publisherPublicKeyDigest);
+    reinterpret_cast<const c::Exclude&>(getExclude()).get(interestStruct.exclude);
+    interestStruct.childSelector = getChildSelector();
+    interestStruct.answerOriginKind = getMustBeFresh() ?
+      (ndn_Interest_ANSWER_CONTENT_STORE | ndn_Interest_ANSWER_GENERATED)
+      :
+      (ndn_Interest_ANSWER_CONTENT_STORE | ndn_Interest_ANSWER_GENERATED | ndn_Interest_ANSWER_STALE);
+    interestStruct.scope = getScope();
+    interestStruct.interestLifetimeMilliseconds = getInterestLifetime();
+
+    interestStruct.nonce.length = 4;
+    interestStruct.nonce.value = const_cast<uint8_t*>(reinterpret_cast<const uint8_t *>(getNonce()));
+  }  
+
+  void 
+  set(const struct ndn_Interest& interestStruct) 
+  {
+    reinterpret_cast<c::Name&>(getName()).set(interestStruct.name);
+    setMinSuffixComponents(interestStruct.minSuffixComponents);
+    setMaxSuffixComponents(interestStruct.maxSuffixComponents);
+  
+    // publisherPublicKeyDigest_.set(interestStruct.publisherPublicKeyDigest);
+  
+    reinterpret_cast<c::Exclude&>(getExclude()).set(interestStruct.exclude);
+    setChildSelector(interestStruct.childSelector);
+    // answerOriginKind_ = interestStruct.answerOriginKind;
+    setScope(interestStruct.scope);
+    setInterestLifetime(interestStruct.interestLifetimeMilliseconds);
+
+    setNonce(*reinterpret_cast<uint32_t*>(interestStruct.nonce.value));
+  }
+};
+
+class Data : public ndn::Data
+{
+public:
+  void 
+  get(struct ndn_Data& dataStruct) const 
+  {
+    // signature_->get(dataStruct.signature);
+    // name_.get(dataStruct.name);
+    // metaInfo_.get(dataStruct.metaInfo);
+    // content_.get(dataStruct.content);
+  }
+
+  void 
+  set(const struct ndn_Data& dataStruct)
+  {
+    // signature_->set(dataStruct.signature);
+    // name_.set(dataStruct.name);
+    // metaInfo_.set(dataStruct.metaInfo);
+    // content_ = Blob(dataStruct.content);
+  }
+};
+
+class ForwardingEntry : public ndn::ForwardingEntry
+{
+public:
+  void 
+  get(struct ndn_ForwardingEntry& forwardingEntryStruct) const 
+  {
+    reinterpret_cast<const c::Name&>(getPrefix()).get(forwardingEntryStruct.prefix);
+    // publisherPublicKeyDigest_.get(forwardingEntryStruct.publisherPublicKeyDigest);
+    forwardingEntryStruct.faceId = getFaceId();
+    // forwardingEntryStruct.forwardingFlags = getForwardingFlags();
+    forwardingEntryStruct.freshnessSeconds = getFreshnessPeriod() / 1000;
+
+    forwardingEntryStruct.action.length = getAction().size();
+    if (getAction().size() > 0)
+      forwardingEntryStruct.action.value = (uint8_t *)&getAction();
+    else
+      forwardingEntryStruct.action.value = 0;
+  }
+
+  void 
+  set(const struct ndn_ForwardingEntry& forwardingEntryStruct) 
+  {
+    if (forwardingEntryStruct.action.value && forwardingEntryStruct.action.length > 0)
+      setAction(string(forwardingEntryStruct.action.value, forwardingEntryStruct.action.value + forwardingEntryStruct.action.length));
+    else
+      setAction("");
+
+    Name prefix;
+    reinterpret_cast<c::Name&>(prefix).set(forwardingEntryStruct.prefix);
+    setPrefix(prefix);
+    // publisherPublicKeyDigest_.set(forwardingEntryStruct.publisherPublicKeyDigest);  
+    setFaceId(forwardingEntryStruct.faceId);
+    // setForwardingFlags(forwardingEntryStruct.forwardingFlags);
+    setFreshnessPeriod(forwardingEntryStruct.freshnessSeconds * 1000);
+  }
+};
+
+}
+
+
 // This is declared in the WireFormat class.
 WireFormat*
 WireFormat::newInitialDefaultWireFormat() 
@@ -36,7 +234,7 @@
   ndn_Interest_initialize
     (&interestStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]), 
      excludeEntries, sizeof(excludeEntries) / sizeof(excludeEntries[0]));
-  interest.get(interestStruct);
+  reinterpret_cast<const c::Interest&>(interest).get(interestStruct);
 
   BinaryXmlEncoder encoder;
   ndn_Error error;
@@ -61,7 +259,7 @@
   if ((error = ndn_decodeBinaryXmlInterest(&interestStruct, &decoder)))
     throw runtime_error(ndn_getErrorString(error));
 
-  interest.set(interestStruct);
+  reinterpret_cast<c::Interest&>(interest).set(interestStruct);
 }
 
 Blob 
@@ -73,7 +271,7 @@
   ndn_Data_initialize
     (&dataStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]), 
      keyNameComponents, sizeof(keyNameComponents) / sizeof(keyNameComponents[0]));
-  data.get(dataStruct);
+  reinterpret_cast<const c::Data&>(data).get(dataStruct);
 
   BinaryXmlEncoder encoder(1500);
   ndn_Error error;
@@ -99,7 +297,7 @@
   if ((error = ndn_decodeBinaryXmlData(&dataStruct, signedPortionBeginOffset, signedPortionEndOffset, &decoder)))
     throw runtime_error(ndn_getErrorString(error));
 
-  data.set(dataStruct);
+  reinterpret_cast<c::Data&>(data).set(dataStruct);
 }
 
 Blob 
@@ -109,7 +307,7 @@
   struct ndn_ForwardingEntry forwardingEntryStruct;
   ndn_ForwardingEntry_initialize
     (&forwardingEntryStruct, prefixNameComponents, sizeof(prefixNameComponents) / sizeof(prefixNameComponents[0]));
-  forwardingEntry.get(forwardingEntryStruct);
+  reinterpret_cast<const c::ForwardingEntry&>(forwardingEntry).get(forwardingEntryStruct);
 
   BinaryXmlEncoder encoder;
   ndn_Error error;
@@ -132,7 +330,7 @@
   if ((error = ndn_decodeBinaryXmlForwardingEntry(&forwardingEntryStruct, &decoder)))
     throw runtime_error(ndn_getErrorString(error));
 
-  forwardingEntry.set(forwardingEntryStruct);
+  reinterpret_cast<c::ForwardingEntry&>(forwardingEntry).set(forwardingEntryStruct);
 }
 
 }
