NCX serialize/deserialize