Skip to content

williammuji/pb_xml_util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xml_util

Utility functions to convert between protobuf binary format and proto3 XML format.

Start

foo@bar:~$ cd ~/codebase 
foo@bar:~$ git clone https://github.com/protocolbuffers/protobuf.git 
foo@bar:~$ cd .. 
foo@bar:~$ git clone https://github.com/williammuji/pb_xml_util.git
foo@bar:~$ cd .. 
foo@bar:~$ cp -R pb_xml_util/* protobuf/ 
foo@bar:~$ cd protobuf 
foo@bar:~$ bazel build :all 
foo@bar:~$ bazel-bin/add_person_cpp address_book 
foo@bar:~$ bazel-bin/list_people_cpp address_book 
<root>
 <_list_people>
  <people name="sarah" id="1302" email="sarah@gmail.com">
   <_list_phones>
    <phones number="18601012332"></phones>
   </_list_phones>
  </people>
  <people name="will" id="10463" email="will@gmail.com">
   <_list_phones>
    <phones number="18917013609"></phones>
   </_list_phones>
  </people>
  <people name="nono" id="58" email="nono@gmail.com"></people>
  <people id="1001"></people>
 </_list_people>
</root>

people {
  name: "sarah"
  id: 1302
  email: "sarah@gmail.com"
  phones {
    number: "18601012332"
  }
}
people {
  name: "will"
  id: 10463
  email: "will@gmail.com"
  phones {
    number: "18917013609"
  }
}
people {
  name: "nono"
  id: 58
  email: "nono@gmail.com"
}
people {
  id: 1001
}

About

Utility functions to convert between protobuf binary format and proto3 XML format

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors