[protobuf] Re: XML to Protocol Buffers converter for CWMP xml files from https://www.broadband-forum.org

2017-08-26 Thread JaeMann Yeh
https://github.com/jaemannyeh/cwmp_grpc

cwmp_grpc

gRPC server and client examples for CWMP demonstrate how to use .proto and 
.methods files which are generated by cwmp_xml_to_proto 
(https://github.com/jaemannyeh/cwmp_xml_to_proto).

You can use .methods files to implement gRPC server's service methods.

cwmp_xml_to_proto generates .proto and .method files using CWMP xml files. 

tr-069-1-0-0-full.proto tr-069-1-0-0-full.methods
tr-098-1-8-0-full.proto tr-098-1-8-0-full.methods
tr-104-2-0-0-full.proto tr-104-2-0-0-full.methods
tr-106-1-2-0-full.proto tr-106-1-2-0-full.methods
tr-135-1-4-0-full.proto tr-135-1-4-0-full.methods
tr-140-1-3-0-full.proto tr-140-1-3-0-full.methods
tr-196-2-1-0-full.proto tr-196-2-1-0-full.methods


On Wednesday, August 16, 2017 at 5:01:30 PM UTC-5, JaeMann Yeh wrote:
>
> https://github.com/jaemannyeh/cwmp_xml_to_proto
>
> This is only for CWMP xml files from https://www.broadband-forum.org.
>
> It successfully coneverted the following files to proto files.
>
> tr-069-1-0-0-full.xml
> tr-098-1-8-0-full.xml
> tr-104-2-0-0-full.xml
> tr-106-1-2-0-full.xml
> tr-135-1-4-0-full.xml
> tr-140-1-3-0-full.xml
> tr-196-2-1-0-full.xml
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: XML to Protocol Buffers converter

2016-05-17 Thread Huimin
Hello Simon,
Sorry! I forgot to mention that I am interested in XML to Protocol Buffers 
converter in java.
Thanks!
Huimin

On Monday, September 28, 2009 at 9:14:52 AM UTC-4, sim wrote:
>
> Hi all. Would anybody be interested in an XML to Protocol Buffers 
> converter if it were opened up to the community?  I have an XML 
> stylesheet that transforms an annotated XSD set into a Java class that 
> uses JAXB and the Protocol Buffers Java API to convert XML documents 
> into either text or binary mode Protocol Buffers messages.  The XSD 
> annotations define the mappings from XSD elements to Proto messages 
> (although at present staying close to a 1:1 mapping is probably 
> safest). Some fancy XSD features are not yet supported but the usual 
> complexTypes, simpleTypes, elements, and enumerations work. 
>
> Simon Weeks 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: XML to Protocol Buffers converter

2016-05-17 Thread Huimin
Hello Simon,
I am interested in the XML to Protocol Buffers converter. Is it opened up 
to the community? Where can I get it?
Thanks a lot for your support!
Huimin

On Monday, September 28, 2009 at 9:14:52 AM UTC-4, sim wrote:
>
> Hi all. Would anybody be interested in an XML to Protocol Buffers 
> converter if it were opened up to the community?  I have an XML 
> stylesheet that transforms an annotated XSD set into a Java class that 
> uses JAXB and the Protocol Buffers Java API to convert XML documents 
> into either text or binary mode Protocol Buffers messages.  The XSD 
> annotations define the mappings from XSD elements to Proto messages 
> (although at present staying close to a 1:1 mapping is probably 
> safest). Some fancy XSD features are not yet supported but the usual 
> complexTypes, simpleTypes, elements, and enumerations work. 
>
> Simon Weeks 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: XML to Protocol Buffers converter

2015-07-16 Thread Aravinth Veeramuthu
How to convert the XML data into the Protocol buffer format in c++???

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: XML to Protocol Buffers converter

2009-12-05 Thread tranchis
Hi all,

Just out of need, we needed a converter from XSD to Thrift and we have
coded it in Java, using XSOM. It's available at 
http://github.com/tranchis/xsd2thrift

The way it's done, it would be really simple to encode the output for
Protocol Buffers as well. If you think it might be interesting, let me
know and I'll give it a try.

Best,

Sergio.

On Dec 3, 7:00 pm, Alex Antonov a...@antonov.ws wrote:
 Jason, there is a project that contains the XML  JSON marshalers for
 protobuf and back which would do exactly what you 
 want:http://code.google.com/p/protobuf-java-format

 Thanks,
 Alex

 On Oct 13, 3:35 pm, Jason Smith jasonfsmi...@gmail.com wrote:



  I wrote a generic proto-to-xml routine (using TinyXML) that'll convert
  any Message* into XML.  Thanks to the reflection interface and
  TextFormat, it was pretty straightforward.  (if there's interest in
  seeing it let me know... I'll clear it with my boss and post to this
  forum).

  Now I'm trying to do the reverse, and I'm having issues with repeated
  fields that are themselves messages.  When parsing the XML it finds a
  repeated message, but I can't figure out what method to call in order
  to automagically create a new object of the correct derived Message
  type for this repeated field.  The goal is to call
  Reflection::AddMessage(), then recursively call my XmlToProto()
  routine on this new object, parsing any children in the XML tree.

  I was looking for a method in either the Descriptor or Reflection
  interfaces to allocate a new object of the right Message-derived type
  (obviously it would have to then return it a a Message*, which is
  fine), but didn't see anything.  Can someone point me in the right
  direction?

  Thanks in advance,
  -Jason

  On Sep 29, 6:06 am, sim simon.we...@gmail.com wrote:

   Cool. New syntax I didn't know about!  I think this would be useful
   for converting the other way around (Proto-to-XML).

   On Sep 28, 6:05 pm, Kenton Varda ken...@google.com wrote:

Interesting.

Another way to do this would be to write code based on protobuf 
reflection
and custom options, so you could have a proto like:
  message Foo {
    optional int32 i = 1 [(xml_disposition) = ATTRIBUTE];
    optional Bar bar = 2 [(xml_disposition) = ELEMENT];
  }

On Mon, Sep 28, 2009 at 6:14 AM, sim simon.we...@gmail.com wrote:

 Hi all. Would anybody be interested in an XML to Protocol Buffers
 converter if it were opened up to the community?  I have an XML
 stylesheet that transforms an annotated XSD set into a Java class that
 uses JAXB and the Protocol Buffers Java API to convert XML documents
 into either text or binary mode Protocol Buffers messages.  The XSD
 annotations define the mappings from XSD elements to Proto messages
 (although at present staying close to a 1:1 mapping is probably
 safest). Some fancy XSD features are not yet supported but the usual
 complexTypes, simpleTypes, elements, and enumerations work.

 Simon Weeks

--

You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.




[protobuf] Re: XML to Protocol Buffers converter

2009-12-03 Thread Alex Antonov
Jason, there is a project that contains the XML  JSON marshalers for
protobuf and back which would do exactly what you want:
http://code.google.com/p/protobuf-java-format

Thanks,
Alex

On Oct 13, 3:35 pm, Jason Smith jasonfsmi...@gmail.com wrote:
 I wrote a generic proto-to-xml routine (using TinyXML) that'll convert
 any Message* into XML.  Thanks to the reflection interface and
 TextFormat, it was pretty straightforward.  (if there's interest in
 seeing it let me know... I'll clear it with my boss and post to this
 forum).

 Now I'm trying to do the reverse, and I'm having issues with repeated
 fields that are themselves messages.  When parsing the XML it finds a
 repeated message, but I can't figure out what method to call in order
 to automagically create a new object of the correct derived Message
 type for this repeated field.  The goal is to call
 Reflection::AddMessage(), then recursively call my XmlToProto()
 routine on this new object, parsing any children in the XML tree.

 I was looking for a method in either the Descriptor or Reflection
 interfaces to allocate a new object of the right Message-derived type
 (obviously it would have to then return it a a Message*, which is
 fine), but didn't see anything.  Can someone point me in the right
 direction?

 Thanks in advance,
 -Jason

 On Sep 29, 6:06 am, sim simon.we...@gmail.com wrote:



  Cool. New syntax I didn't know about!  I think this would be useful
  for converting the other way around (Proto-to-XML).

  On Sep 28, 6:05 pm, Kenton Varda ken...@google.com wrote:

   Interesting.

   Another way to do this would be to write code based on protobuf reflection
   and custom options, so you could have a proto like:
     message Foo {
       optional int32 i = 1 [(xml_disposition) = ATTRIBUTE];
       optional Bar bar = 2 [(xml_disposition) = ELEMENT];
     }

   On Mon, Sep 28, 2009 at 6:14 AM, sim simon.we...@gmail.com wrote:

Hi all. Would anybody be interested in an XML to Protocol Buffers
converter if it were opened up to the community?  I have an XML
stylesheet that transforms an annotated XSD set into a Java class that
uses JAXB and the Protocol Buffers Java API to convert XML documents
into either text or binary mode Protocol Buffers messages.  The XSD
annotations define the mappings from XSD elements to Proto messages
(although at present staying close to a 1:1 mapping is probably
safest). Some fancy XSD features are not yet supported but the usual
complexTypes, simpleTypes, elements, and enumerations work.

Simon Weeks

--

You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.




[protobuf] Re: XML to Protocol Buffers converter

2009-11-25 Thread Kartik
Hi Jason
I'm trying to feed an application which only takes XML but I only
receive data as protocol buffers.
Would it be possible for you to share the proto-to-xml routine that
you made?
Thanks,

Kartik

On Oct 13, 4:35 pm, Jason Smith jasonfsmi...@gmail.com wrote:
 I wrote a genericproto-to-xmlroutine (using TinyXML) that'll convert
 any Message* intoXML.  Thanks to the reflection interface and
 TextFormat, it was pretty straightforward.  (if there's interest in
 seeing it let me know... I'll clear it with my boss and post to this
 forum).

 Now I'm trying to do the reverse, and I'm having issues with repeated
 fields that are themselves messages.  When parsing theXMLit finds a
 repeated message, but I can't figure out what method to call in order
 to automagically create a new object of the correct derived Message
 type for this repeated field.  The goal is to call
 Reflection::AddMessage(), then recursively call my XmlToProto()
 routine on this new object, parsing any children in theXMLtree.

 I was looking for a method in either the Descriptor or Reflection
 interfaces to allocate a new object of the right Message-derived type
 (obviously it would have to then return it a a Message*, which is
 fine), but didn't see anything.  Can someone point me in the right
 direction?

 Thanks in advance,
 -Jason

 On Sep 29, 6:06 am, sim simon.we...@gmail.com wrote:

  Cool. New syntax I didn't know about!  I think this would be useful
  for converting the other way around (Proto-to-XML).

  On Sep 28, 6:05 pm, Kenton Varda ken...@google.com wrote:

   Interesting.

   Another way to do this would be to write code based on protobuf reflection
   and custom options, so you could have aprotolike:
     message Foo {
       optional int32 i = 1 [(xml_disposition) = ATTRIBUTE];
       optional Bar bar = 2 [(xml_disposition) = ELEMENT];
     }

   On Mon, Sep 28, 2009 at 6:14 AM, sim simon.we...@gmail.com wrote:

Hi all. Would anybody be interested in anXMLto Protocol Buffers
converter if it were opened up to the community?  I have anXML
stylesheet that transforms an annotated XSD set into a Java class that
uses JAXB and the Protocol Buffers Java API to convertXMLdocuments
into either text or binary mode Protocol Buffers messages.  The XSD
annotations define the mappings from XSD elements toProtomessages
(although at present staying close to a 1:1 mapping is probably
safest). Some fancy XSD features are not yet supported but the usual
complexTypes, simpleTypes, elements, and enumerations work.

Simon Weeks

--

You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.




Re: XML to Protocol Buffers converter

2009-09-29 Thread sim

Cool. New syntax I didn't know about!  I think this would be useful
for converting the other way around (Proto-to-XML).

On Sep 28, 6:05 pm, Kenton Varda ken...@google.com wrote:
 Interesting.

 Another way to do this would be to write code based on protobuf reflection
 and custom options, so you could have a proto like:
   message Foo {
     optional int32 i = 1 [(xml_disposition) = ATTRIBUTE];
     optional Bar bar = 2 [(xml_disposition) = ELEMENT];
   }

 On Mon, Sep 28, 2009 at 6:14 AM, sim simon.we...@gmail.com wrote:

  Hi all. Would anybody be interested in an XML to Protocol Buffers
  converter if it were opened up to the community?  I have an XML
  stylesheet that transforms an annotated XSD set into a Java class that
  uses JAXB and the Protocol Buffers Java API to convert XML documents
  into either text or binary mode Protocol Buffers messages.  The XSD
  annotations define the mappings from XSD elements to Proto messages
  (although at present staying close to a 1:1 mapping is probably
  safest). Some fancy XSD features are not yet supported but the usual
  complexTypes, simpleTypes, elements, and enumerations work.

  Simon Weeks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~--~~~~--~~--~--~---