0 Replies Latest reply on May 12, 2007 3:14 PM by RekhaPatel

    How to specify the XML Declaration for an XML variable

    RekhaPatel
      I need to set the XML declaration for my XML variable as follows:
      var employees:XML =
      <?xml version="1.0" encoding="utf-8"?>
      <employees>
      <employee ssn="123-123-1234">
      <name first="John" last="Doe"/>
      <address>
      <street>11 Main St.</street>
      <city>San Francisco</city>
      <state>CA</state>
      <zip>98765</zip>
      </address>
      </employee>
      <employee ssn="789-789-7890">
      <name first="Mary" last="Roe"/>
      <address>
      <street>99 Broad St.</street>
      <city>Newton</city>
      <state>MA</state>
      <zip>01234</zip>
      </address>
      </employee>
      </employees>;


      However, if I specify <?xml version="1.0" encoding="utf-8"?>, I get a design time and compile error. If I remove it it works fine. But the server to which I send this XML is expecting the declaration. Can somebody help me with this?

      Thanks