Hi:

Being somewhat an XML newbie, I question whether my 
implementation methods are sound (or proper) with
the XML community). My question relies largly
on the internal representation of my XML data and
exporting/importing this data between my
internal format and the external/textual format. 

I am using XML for its ability to store data
hierarichally, however, after importing the
data, I need to be able to work with the data
in an efficient manner. The standard XML string
is very limiting since much of my data is
numeric. So to overcome this problem I created
and Abstract XML Tree class that converts
the XML data in to the form that I need.
This makes it easy to manipulate the data,
and when I'm done I export it back to an xml string,
which may either be written to a file or parsed 
by some XML object, such as NQXML.

Although this is convenient, the two formats
are not exactly equivalent. Consider for a moment
some chunk of XML data as it gets translated
to my AXT internal format.

+---------------+    +----------------+    +-----+       +-------------+
| XML File      | => | XML DOC Format | => | AXT | =>    | XML         |
| Textual Data  |    | (NQXML)        |    |     | round | File/String |
+---------------+    +----------------+    +-----+ trip  | Textual     |
                                                         +-------------+

When the data is converted to my AXT format, I do
not carry over the following:
 1) Comments of the form <!-- -->
 2) Order of nodes
 3) Entity references are not maintained.

Not maintaining these items made AXT a lot simpler to write.
However, when I make the round trip, although the 'data' is
identical, the XML text files will not be. For the purposes
of my project, these limitations are tolerable since the XML 
data is primarily read by a computer and not a person and I
never overwrite an XML file that is meant for human consumption.

So, after having gone to all this effort, did I waste my time?
Are there standard ways of doing this without the information loss?

Just wondering.

Thanks

-- 
Jim Freeze
"Give some people an attoparsec and
they'll take 16.093 Tera-angstroms"