2 Replies Latest reply on Jun 24, 2006 3:37 PM by inssp

    Import XML Into Cast Error

      greetings...I am trying to import an XML file into the cast and am getting an error message stating "Having Touble Reading...filename...continue import? -1"

      Hitting ok seems to attempt an import, but the cast member never shows up. I have no problem loading the file at runtime with the fileio command but would like to include in the cast for shockwave publishing. File also loads fine in WordPad, Firefox, my XML editor, etc. Documentation states that import supports text, rtf and html...is it possible it is seeing the markup and returning some sort of unsupported file type error? XML Parser documentation indicates that XML cast members are possible.

      Any thoughts??

        • 1. Re: Import XML Into Cast Error
          Level 7
          XML is a file type not /usually/ imported, but you should be able to
          create a text member and set it's filename to the XML file. Try
          something like (executed from your message window):
          tMember = _movie.newMember(#text)
          tMember.name = "XML document"
          tMember.filename = "pathToXML"
          tMember.linked = 0
          • 2. Re: Import XML Into Cast Error
            inssp Level 1
            thanks...I'll give that a try. In the meantime I copied the file into a raw text file, saved it with a .txt extension and the import worked fine.

            Longer term I'll load it via ParseURL or getNetText, but it is easier to include it in the movie for right now.