1 Reply Latest reply on Aug 11, 2010 11:37 AM by nycynik

    How to create a xml file from String object in CS4

    Anitha Selvaraj

      Hi All,


      I want to convert a string object into an XML file using Javascript in Indesign CS4.


      I have done the following script. But it does not convert the namespaces for the xml elements with no value in it.


      var xml = new XML(string);


      The value present in string is "<level_1 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>"


      When it is converted to xml, the value becomes "<level_1 xsi:nil="true"/>"


      On processing the above xml object, am getting an error like this "Uncaught JavaScript exception: Unbound namespace prefix."


      Kindly help.