tags:

views:

35

answers:

2

In the context of loading an XML file, what's a good name for the step in which you create internal data structures (be they objects, structs, or whatever) to hold the data in memory? What do you usually call the other steps?

  1. LOAD, OPEN, or READ the xml, by opening a file.
  2. PARSE the xml, with some XML parser.
  3. ??? the xml, creating data structures.

Options that have come to mind for step 3 are: handle, create_foobars, create_foobars_from_xml, or even read, load, or parse.

One other option that comes to mind is to have an object's constructor take an xml entity, but I'm not fond of coupling the objects to the xml schema like that.

+7  A: 

Deserialization is the correct term for the "???" part of your question. If you want to convert the object back to XML, then that would be (you guessed it) serialization.

skb
That presumes that the xml is a direct serialization of the data structure. What if the xml is coming from a different program and the data structures you are building do not exactly match the schema? Would you still call it deserialization?
Dan Homerick
@Dan Homerick: since "serialization" is simply storing class data in a persistable format, I think "Deserialization" is still the correct answer. Remember that, at least in .NET, you can have custom Deserialization just like you can have custom Serialization. There's no requirement that a given XML document necessarilly has to match a schema, that's just something that can be required, or not.
AllenG
+4  A: 

Deserialization or unmarshalling.

Don Roby