[Xerte] Re: Converting an object to xml

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Mar 7 12:05:45 GMT 2012


I don't think you're going to get bi-directional because

<node att="value"> is node[0].att and <node><att>value</att></node> is node[0].att

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Kemp Johnathan
Sent: 07 March 2012 11:21
To: Xerte discussion list
Subject: [Xerte] Re: Converting an object to xml

What I was hoping to achieve was a bi-directional capability i.e.

you could go back and forth, perhaps creating your initial object from xml data, then modify the object in a page, then save it out as xml again. Then the next time you load the page you have the option of restoring a your previously saved data.

Kind regards

Johnathan

On 7 March 2012 11:03, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
Good question. No, not currently. Have a look for a prototype extension and I can build it in if it does what you want: it would probably not create attributes, rather full nodes for each value, and it would have to make some assumptions when naming things I think:

<object>
  <property>value</property>
  <array>
    <item>value</item>
    ....
  </array>
...
</object>

From: xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk> [mailto:xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk>] On Behalf Of Kemp Johnathan
Sent: 07 March 2012 10:40
To: Xerte discussion list
Subject: [Xerte] Converting an object to xml

Xerte has the myXML.toObject() method that will construct an object from xml data.

Is there an easy way to go in the other direction and convert an object into XML data?

Kind regards

Johnathan


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk<mailto:Xerte at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120307/c2a5015b/attachment.html>


More information about the Xerte mailing list