3 Replies Latest reply on Jul 31, 2008 12:02 PM by (Keith_Cooper)

    xml documentation


      I am loocking for a documentation for loading xml in Indesign by Scripting.
      Do you konw where in can find it !


        • 1. Re: xml documentation
          You can find it in the Scripting guide on your InDesign DVD (CS3, I don't know about others). Here is code that I'm using from within a stand-alone VB app. It launches InDesign, sets the XML import preferences, and merges the XML. Note that you supply "DocumentFilespec" and "XMLFilespec".

          Dim InDesign As Object
          Dim InDesignDocument As Object
          Dim XMLView As Object
          Dim XMLImportPrefs As Object

          Set InDesign = CreateObject("Indesign.Application.CS3")
          Set InDesignDocument = InDesign.Open(DocumentFilespec)
          Set XMLView = InDesignDocument.XMLViewPreferences
          Set XMLImportPrefs = InDesignDocument.XMLImportPreferences

          XMLView.ShowStructure = False

          XMLImportPrefs.AllowTransform = False
          XMLImportPrefs.CreateLinkToXML = False
          XMLImportPrefs.IgnoreUnmatchedIncoming = True
          XMLImportPrefs.IgnoreWhitespace = True
          XMLImportPrefs.ImportCALSTables = False
          XMLImportPrefs.ImportStyle = 1481469289
          XMLImportPrefs.ImportTextIntoTables = False
          XMLImportPrefs.ImportToSelected = False
          XMLImportPrefs.RemoveUnmatchedExisting = False
          XMLImportPrefs.RepeatTextElements = False

          InDesignDocument.ImportXML XMLFilespec

          Set InDesign = Nothing
          Set InDesignDocument = Nothing
          Set XMLView = Nothing
          Set XMLImportPrefs = Nothing
          • 2. Re: xml documentation
            Level 1
            cool Thanks,

            How do send from your VB app information.

            I am woorking in a web app and I try to send from my web broswer variable or an XML files.

            • 3. Re: xml documentation
              Level 1
              I'm sorry, I don't understand your question.