How to deserialize XML DOM object stored in DriverPropertyBag inside constraint javascript? RRS feed

  • Question

  • Hi,

    I'm trying to deserialize XML DOM from the string stored in the driver property bag; unlike browser environment, it does not support activex object or document.implementation.createDocument.

    is it possible to create a DOM inside constraint javascript? (or) create a empty DOM from the existing object like PrintTicket?

    If answer is NO, does it support converting from JSON stream (from property bag) into javascript object?



    Tuesday, October 1, 2013 10:25 PM

All replies

  • Hi Snekethan,

    The JavaScript environment is very locked down. Can you provide some of the scenarios you're looking to enable by deserializing this kind of information into an object with an API model? The driver property bag does support definition of a large number of objects, so it seems like it could be redundant to store a single complex object instead of multiple objects with a single purpose.



    Friday, October 4, 2013 12:25 AM
  • Hi Justin,

    >The driver property bag does support definition of a large number of objects

    Do you mean i can serialize custom COM objects into driver property bag that can be de-serialized and used from the constraint java script.

    >The JavaScript environment is very locked down.

    My understanding is similar to yours that JS environment is very locked down, even though structure storage supports storing com object, but inside the JS won't allow de-serializing custom objects, with that property bag supports only very basic types, int,bool, string, stream, right?



    Tuesday, October 8, 2013 4:47 PM