Convert "A specific record" from protocol buffer to xml ?

17 views
Skip to first unread message

Assaf B. Spanier

unread,
Oct 1, 2013, 8:51:14 AM10/1/13
to pi...@googlegroups.com

Hi again,

I have successfully converted my protocol-buffer file into XML file using piqi :-)

I'm now wondering if there is a way to convert only some portion of the file and not all of it ? 
 I.e. in the address book example, converts only the records which 'Person'.name = Bob and discard all other ?

If piqi does not have this functionality what would be the easiest way of doing so ?

Thanks in advance,

Anton Lavrik

unread,
Oct 2, 2013, 4:09:12 AM10/2/13
to pi...@googlegroups.com
Great!

I'm not aware of a tool that could do something like that at Protocol Buffers level. Piqi doesn't have this ability for sure.

However, once you converted PB  to XML you can use XPath to filter out unwanted results. There are some good command-line tools that support XPath. For example: http://xmlstar.sourceforge.net/

Anton
 


--
You received this message because you are subscribed to the Google Groups "piqi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to piqi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Assaf B. Spanier

unread,
Oct 2, 2013, 4:22:40 AM10/2/13
to pi...@googlegroups.com
Great. 
Many thanks!!


--
You received this message because you are subscribed to a topic in the Google Groups "piqi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/piqi/gX6wwvUNaO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to piqi+uns...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
- Assaf


We are all - others.


Reply all
Reply to author
Forward
0 new messages