Reputation: 1914
What is the antonyms of "parsing" in terms of XML document.
For Example:
Upvotes: 9
Views: 3232
Reputation: 6696
In the field of programming languages design and implementation, where parsing produces an (abstract) syntax tree, unparsing is the reverse operation where source code is obtained by printing it back using the syntax tree as input.
When the output source code is also make "pretty", unparsing is called "formatting" or "pretty-printing".
Upvotes: 0
Reputation: 1885
I already saw many verbs being used as the opposite of "parsing". I don't think that there is a common standard for it.
In the XML context I prefer the term "rendering" as the antonym of "parsing". My second choice would be "composing" if you don't like to use the verb "to render" in a non-visual context.
But although it might be technically correct from a low-level perspective, I would never use the term "serializing" for this. This only feels suitable to me, if one would also use the term "deserializing" in the same context. But I think that "parsing XML" is the widely accepted standard term here instead. So I suggest to use "rendering XML" or "composing XML" to describe the opposite process.
Upvotes: 6
Reputation: 41381
Serialization. Deflation. Composing. Storing. Freezing. Persisting.
Marshalling is a similar concept, but it might be instructive to know the differences..
In objective-c serialization is known as archiving.
Python pickles.
Upvotes: 7
Reputation: 7143
Serialisation is the process of converting a DOM tree to something for output (text, file, etc).
I've heard composition, generation and construction as terms for the actual 'building' of the new DOM tree.
Upvotes: 1
Reputation: 288130
Parsing, also called loading, is a synonym for deserializing, i.e. converting an arbitrary input to an easily readable/manipulable form.
Therefore, you can't create a new document with a DOM parser. However, complete DOM implementations contain mechanisms to generate(or construct) and serialize(or save) XML documents.
Upvotes: 3