Serializing an Eiffel object to XML

View: New views
4 Messages — Rating Filter:   Alert me  

Serializing an Eiffel object to XML

by vrhj2000 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I want to know how to write an XML file from an Object.
Or how I can write an XML file from Eiffel

Thanks





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Serializing an Eiffel object to XML

by Peter Gummer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

vrhj2000 wrote:
>
> I want to know how to write an XML file from an Object.
> Or how I can write an XML file from Eiffel

There are lots of XML classes in the Gobo library.

- Peter Gummer


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Serializing an Eiffel object to XML

by vrhj2000 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok,I am looking into it

I want to know if I can do something like this.

For Example suppose that I have a class Person

class PERSON
create
   make
feature
   -- other code
   name:STRING
   lastname:STRING
   -- other code
 
end
//

p1:PERSON
create p1.make("Joe", "Walnes");

// the from some API do this


stream:XML_STREAM
xml : STRING
create stream.make

xml := stream.toXML(p1);

the I want to get something like this

<person>
  <name>Joe</name>
  <lastname>Walnes</lastname>
</person>


Thanks
Javier


--- In eiffel_software@..., "vrhj2000" <vrhj2000@...>
wrote:
>
> Hi!
>
> I want to know how to write an XML file from an Object.
> Or how I can write an XML file from Eiffel
>
> Thanks
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


RE: Re: Serializing an Eiffel object to XML

by Emmanuel Stapf [ES] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> the I want to get something like this
>
> <person>
>   <name>Joe</name>
>   <lastname>Walnes</lastname>
> </person>

Currently we only provide binary serializer. One could extend our SED
library to provide an XML backend but since one has to identify objects the
format would not be that readable. If you only need to serialize simple
objects like that you could simply write the XML yourself and on the reading
side use an XML parser to reconstruct the object.

Regards,
Manu


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/