Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19771
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to convert Map to xml based on Schema. |
| Date | 2012-11-17 00:48 -0800 |
| Organization | Canadian Mind Products |
| Message-ID | <6rjea89htdn154gf2f9qja6ecj8lplr0ar@4ax.com> (permalink) |
| References | <7e1a4b59-0c97-40ca-af6e-22277f62b469@googlegroups.com> |
On Fri, 16 Nov 2012 22:52:46 -0800 (PST), Mausam <mausamhere@gmail.com> wrote, quoted or indirectly quoted someone who said : > >I have a Map (it can be nested map, containing of maps) and a schema. Keys in Map represent element/attribute name of the schema and an entry in Map will be at same depth as an element defined in schema Presuming you can chase/span/visit nodes of your MAP tree and build a parse tree in RAM, element by element see http://mindprod.com/jgloss/xml.html#WRITING for how to get a linear stream of XML text out of it. You might want to read up on the visitor pattern so that each node can convert itself. see http://mindprod.com/jgloss/visitor.html -- Roedy Green Canadian Mind Products http://mindprod.com Types of Garbage Collection: ()In Canada, the government sends men to your house every every week to take away your garbage. Hoarders are free to hang onto things they don't really need. ()In third world countries, it is up to you to take your own garbage away. ()Java's garbage collection system is analogous to a garbage removal system where every hour, workers scan your house for junk mail, the contents of waste baskets, carpet lint, toenail clippings and anything else they are absolutely sure you don't want to keep. ()C++'s system for disposing of unreferenced objects is similar to India's, with the strange feature that undiscarded garbage becomes invisible but still stinks.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to convert Map to xml based on Schema. Mausam <mausamhere@gmail.com> - 2012-11-16 22:52 -0800
Re: How to convert Map to xml based on Schema. Roedy Green <see_website@mindprod.com.invalid> - 2012-11-17 00:48 -0800
Re: How to convert Map to xml based on Schema. Mausam <mausamhere@gmail.com> - 2012-11-17 20:14 -0800
Re: How to convert Map to xml based on Schema. Roedy Green <see_website@mindprod.com.invalid> - 2012-11-18 07:02 -0800
Re: How to convert Map to xml based on Schema. Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 16:15 -0500
Re: How to convert Map to xml based on Schema. Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 21:42 -0500
Re: How to convert Map to xml based on Schema. Mausam <mausamhere@gmail.com> - 2012-11-19 02:22 -0800
Re: How to convert Map to xml based on Schema. Arne Vajhøj <arne@vajhoej.dk> - 2012-11-19 09:37 -0500
Re: How to convert Map to xml based on Schema. Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-11-19 06:59 -0400
Re: How to convert Map to xml based on Schema. Mausam <mausamhere@gmail.com> - 2012-11-19 22:26 -0800
Re: How to convert Map to xml based on Schema. Stuart <DerTopper@web.de> - 2012-11-20 20:52 +0100
csiph-web