CS2 AS: Scripted "Import XML" is not working (like manual import does)

I have problem where importing a XML (merge import + delete unmatched) by script simply doesnt work, where the manual import works 100% fine!!??
(I'm exporting the XML, refill it with new text data (localisation process actually), and bring the xml back to commit the change in the Indesign document).
With the script, the XML get imported as a child in the XML
I have xml structure like:
root
node
and get something like
root
node
root
node
My code looks like this (sorry for the formatting):
tell application "Adobe InDesign CS2"
tell XML import preferences
set create link to XML to false
set ignore unmatched incoming to true
set ignore whitespace to false
set import style to merge import
set import text into tables to false
set import to selected to false
set repeat text elements to false
set remove unmatched existing to true
end tell
try
import XML (document 1) from pFilePath
on error pmsg
display dialog pmsg
end try
end tell
Is there something obvious that i'm misssing??
ps: I have checked the XML structure correspondance already.. but i dont think that's the cause of problem as the manual import is working.
Thanks for any help!
Eric

Hi Eric,
If you can see the behavior in the user interface, you can see it in scripting. I think it makes perfect sense to have the XML import preferences set at the document level, because some documents need one set of preferences; other documents need another. I think (hope) that the user documentation covers the differences between application and document preferences (if not, I do, in my book).
If you see a preferences object on both the application and the document, assume you want to use the document preferences. Unless you're trying to set preferences for new documents.
Thanks,
Ole

Similar Messages

  • Importing xml is not working

    Hello i am trying to import an xml file into a document but its not allowing the import.
    Let me clarify a bit, i have allready imported the same xml in about 50-60 different documents without any problems, but now i have a document that does not allow me to import the xml.
    After looking a bit deeper i found the following:
    You can see that the parameter "Only import elements that match existing structure" is checked. When i uncheck this param, the xml is imported correctly.
    Now i tried to simulate is via scripting but with no success.
    Here's what i tried:
    InDesign.app.xmlImportPreferences.importToSelected = true;
    InDesign.app.xmlImportPreferences.importStyle = XMLImportStyles.MERGE_IMPORT;
    InDesign.app.xmlImportPreferences.ignoreUnmatchedIncoming = false;

    And the document import xml settings are the same as in the screenshot? Also, you are using extendscript, my example is actionscript and i've noticed quite some differneces between the 2 in the past (although they use the same API).
    Edit: There is also the fact that i didnt test your code ( ignorent as i am) and didnt see that your example actually DOES work. Thank you very much for your help,
    On a sidenote: can you explain me why it works if you call:
    InDesign.app.activeDocument.xmlImportPreferences
    but not when you call:
    InDesign.app.xmlImportPreferences
    My thought was that when you call it on the document, then it's only for the current document, but when you call it on the application, then it is for all documents that get processed by that application.
    Is this wrong? Or is it the way it is meant to be?

  • Importing XML. Not working for me.

    I've watched the InDesign/XML video now three or four times and I've tried to follow its steps diligently. But, I'm not having success. I created an InDesign template with all of the xml placeholder items in place. The structure at the left side of the screen looked proper. I opened the template, then, imported the xml. All of the imported elements lost any line endings and are crowded together at the top left of each business card. Can someone please help me with this?
    Thanks,
    Peter

    OK, the screenshot doesn't really demonstrate the problem, but it gives some context.
    It would help to both see the problem and to have Hidden Characters turned on (Cmd-Opt-I or Ctrl-Alt-I).
    Are you actually using InData right now for this problem? Because if you're using straight-up InDesign, I'm not sure how you're going to get more than 1 business card on each layout without either custom scripting or Data Merge that doesn't do XML.
    Do you have line breaks in your layout right now? I can't tell. I assume the problem is the first line becomes
    {FullName}{Title}
    instead of
    {Fullname}
    {Title}
    If so, you just need a paragraph boundary between them -- either hit Return or shift-Return, depending on exactly what's supposed to happen.

  • Importing bookmarks I go to file and the IMPORT link is not working ... not Illuminated ... what can I do?

    I want to import bookmarks from Explorer and I go to File Tab and the IMPORT link is not working or not illuminated?

    Make sure that you not run Firefox in permanent [[Private Browsing]] mode.
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Uncheck: [ ] "Permanent Private Browsing mode"

  • "Do not import duplicates" is not working

    The "Do not import duplicates" box is checked for all imports but is not working.  This is both for my Nikon DSLR, my Canon S-95 and my iPhone. This was happening with both Snow Leapord and Lion as operating system.  I have been using Aperture since the first release and only in the last few months has this been an issue.  Any thoughts?

    There's a known (and old) bug when duplicate identification fails on photos
    that have been imported from another catalog.
    Sent from phone.

  • I just buy an iPhoto 11 version and it's not working. No import to library, no open, no slideshow, nothing.... Quit unexpected. Simply NOT working guys. :-( Any ideas? Tnx

    Hi Guys
    I just buy from Apple Store a iPhoto 11 version and it's not working.
    No import, no open, no slideshow, nothing... It's frozen!!! Quit unexpected.... Simply not working!
    Any ideas?  Tnx.

    What happens when you try? More information gets you better help...

  • My passbook on my iphone 5 works the same as it did for the iphone 4, its not working like it should. why?

    my pass book on my iphone 5 does not work like it should, it works just the same as it did on the iphone 4, i tryed the date an time trick like 5 times an still nothing. i tryed factory reset an nothing. i know it workds different on the iphone 5 then the 4. but i dont know what else to do.

    Can you be more specific about what isn't working?  Are you running iOS 6 or iOS 6.1?
    Did you read the support page on Passbook?  http://support.apple.com/kb/HT5483

  • Siri is not working like it should i ask it to play songs and it just says sorry i cant do that any ideas y

    siri is not working like it should i asked it to play songs and it just says sorry i cant do it any ideas y

    Debbie:
    deborahfromwindsor wrote:
    he advises restarting by inserting the OSX disc and pressing down the C button to reboot from there then selecting disk utility, hard disk and repair.... Does he mean me to hold down the C key on the alpha keyboard or the ctrl key?
    Should I just ask for my money back??? If it is a simple repair do I just literally push the disc in, push the power button and hold down the C button?
    That's where I would begin, too, with
    Repair Disk
    Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu (Panther and earlier) or Utilities menu (Tiger) and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.TStatus of HDD at the bottom of right panel, and report if it saysanything but Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    If DU reports errors it cannot repair you will need touse autility like TechTool Pro,Drive Geniusor DiskWarrior
    First we need to determine if the issue you are experiencing with the computer is software or hardware based. Once we have gotten things sorted out there should be time enough to make you decision about keeping or returning it.
    cornelius

  • HT2638 since updating iPhoto it has ceased to open.  i have tried to Hold down the Command and Option keys on the keyboard but it does not work.  iPhoto still does not open

    Since updating iPhoto it has ceased to open.  I have tried to Hold down the Command and Option keys on the keyboard which is the suggested solution to then open a suggested solution to rebuild the library,  but it does not work.  iPhoto still does not open.  can someone please help?
    thank you

    Try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
        Home/Library/ Preferences folder.
    2 - delete iPhoto's cache folder(s):
    Home/Library/Containers/com.apple.iPhoto
    and, if there is one, the
    Home/Library/Caches/com.apple.iPhoto folder
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    Happy Holidays

  • In iTunes 11.1 (I26) , I cannot find how to delete podcast listings showing undownloaded podcasts. Delete does not work. Option Delete does not work.  Dragging to the trash does not work. Under Edit, Delete is greyed out. Mac OS 10.6.8

    in iTunes 11.1 (I26) , I cannot find how to delete podcast listings showing undownloaded podcasts. Delete does not work. Option Delete does not work. Dragging to the trash does not work. Under Edit, Delete is greyed out. Mac OS 10.6.8.
    Tom at the Genius Bar told me that Option Delete would work. It does not.
    I had to upgrade to iTunes 11.1.(I26) because it is required with OS7 on my iPod Touch (5th Gen). I have tried shutting down iTunes, then shutting down the entire system. This is the first in many visits that the Genius Bar gave me a solution that did not work.
    This is a big awkward computer locked to my desk. I would rather not unlock it and then carry it through a shopping center to the Genius Bar if i can avoid oit.
    When I installed iTunes 11.1, I discovered that Ihad to resubscribe to virtually all of the podcasts that I had previously been subscribed to. That was a surprise.

    Hello Achates:
    I did not read the rather long post. If you wish to reinstall OS X 10.4, use your software install DVD. Backup is essential. To minimize your risk, I would use an archive and install:
    http://docs.info.apple.com/article.html?artnum=107120
    In that way, you will have a fresh copy of OS X and your current settings will be preserved.
    Incidentally, I do not agree that the printer problem is best solved by reinstalling OS X. I have had HP printers for sometime and, on one occasion, had difficulty after an upgrade. HP technical support walked me through uninstalling all traces of the HP driver and then reinstalling.
    Barry

  • The attach a file button (in netzero e-mail) does not work in firefox but does in explorer

    The "attach file button" (in net zero e-mail) does not work in firefox but does in explorer.
    == URL of affected sites ==
    http://

    *Tools > Options > Privacy > History: Firefox will: "Use custom settings for history"
    *Tools > Options > Privacy > History: "Remember search and form history"
    See also [[Form autocomplete]]

  • Drawing with a custom profile stroke is not working for me. Does it work for you?

    Drawing with a custom profile stroke is not working for me. Does it work for you?
    I can only apply it on an existing stroke but can't draw a new one with the selected profile. In fact if I change the profile to other than the default Uniform I also can't draw a new stroke with any other width than the default 1 point. This doesn't seem normal.
    Using SC5 on a PC.

    Another question on the same topic.
    Once I add a new profile to the list is it possible to put it on top of the list. I need this because the Adobe people decided to put the list in a tiny scrollable window with only a few of the first profiles showing. If there is noting in the interface may be I have to modify some program files settings?

  • I am new to mac air. Today i installed (unsuccessfully!) MAPLE16 on my mac book air. Now since it does not work properly (it also does not appear in  applications) i decide to delete it. I could not remove it from launchpad . i need urgent help

    i am new to mac air. Today i installed (unsuccessfully!) MAPLE16 on my mac book air. Now since it does not work properly (it also does not appear in  applications) i decide to delete it. I could not remove it from launchpad . i need urgent help from your side.

    Any third-party software that doesn't install by drag-and-drop into the Applications folder, and uninstall by drag-and-drop to the Trash, is a system modification.
    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    I never install system modifications myself, and I don't know how to uninstall them. You'll have to do your own research to find that information.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickMyMac” (a hypothetical example.) First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickmyrmac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickMyMac.dmg and open it. There may be an application in there such as “Uninstall BrickMyMac.” If not, open “BrickMyMac.pkg” and look for an Uninstall button.
    You generally have to reboot in order to complete an uninstallation.
    If you can’t remove software in any other way, you’ll have to erase and install OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    You may be advised by others to try to remove complex system modifications by hunting for files by name, or by running "utilities" that purport to remove software. I don't give such advice. Those tactics often will not work and maymake the problem worse.

  • I called Verizon prior to travelling abroad and asked to turn roaming on. As of today, 4 days later, I have no service. I do not have a landline to call. GlobalServices email does not work... Does anybody know how to reach customer support via email?

    I called Verizon prior to travelling abroad and asked to turn roaming on. As of today, 4 days later, I have no service. I do not have a landline to call support. GlobalServices email does not work... Does anybody know how to reach customer support via email?

        Hi Florence2014
    I'm so sorry your having issues. Unfortunately there isn't an email for global support. The only way way to reach them while traveling is to call them at 908-559-4899.
    JoeL_VZW
    Follow us on Twitter @VZWSupport

  • Image drag drop not working in scaffholding. Does it require soem setting?

    image drag drop not working in scaffholding. Does it require soem setting?

    Hello Manoj,
    The scaffolding teamplate which you use to create scaffolding page is actually a design prototype which helps you to create similar types of pages instances very quickly without authoring each page separately (for example news, aticle types of pages) and that is the concept of scaffolding only.
    For example - When you go to location http://localhost:4502/miscadmin#/etc/scaffolding/geometrixx you will see a "News" page which is an example of scaffolding (this is a similar page which you can create using scaffolding template).
    Now if you open this page you will be accessing http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html and here you will see already design page.
         1. if you access page properties from side kick you will see how this page is configured using target template and target path
         2. if you go to design mode using side kick you will see how the component has been design (which is similar to what appears on page when you came first time)
         3. Now come back to normal view of that page (http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html) and author this page with some dummy property and click on "create" button. I know here you can not author the image as it comes as disabled empty box.
         4. once you author the content and click on create button it will create an instance of scaffolding page on the same page you can see the link on the top of same page.
         5. Now access that page, when you access that page the page will take reference of target template you configured using pare preoperties to display the page.
         6. On this page you will see the same component you configured and when you will edit it you can author the image from there directly.
    Now question is why to configure same component two times half data from scaffolding and half data from page but answer is the design is correct because the page design which you have created (for example http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html) is just proto type to create actual page instances and prototype can not holds values for page instance (specially image until it doesnt configured correctly for page instance in this case) which exist only when you create pages using the scaffolding page prototype. Otherwise you have to do more customization by extending scaffolding "/libs/wcm/scaffolding" changing the code and design OR you have to design it according to your target page strtucture which you have configured in page properties (specially image node).
    If you want to create your own page prototype using scaffolding template and want image to associate just copy paste "/etc/scaffolding/geometrixx/news/jcr:content/dialog/items/items/tab2" node to your newly created scaffolding page prototype.
    for more information on scaffolding just refer -http://dev.day.com/docs/en/cq/current/wcm/scaffolding.html
    I hope it clarifies your question and help you to proceed. Let me know if you need more information or help.
    Thanks,
    Pawan

Maybe you are looking for

  • How to distinguish numbers in "Recent" list

    Is there a way to distinguish the number in my recent list? Let's say that I have John Doe's work and home number in my contacts. In my recent list, it does not say which number was used. If it had a designation behind the name, i.e., John Doe (H), J

  • Formatting an external drive after use on NSLU2

    I have a Western Digital 1TB My Book that I am trying to reclaim for use on another windows system. When I plug it into a Windows 7 system it fails to find the HID driver - but I think this could get fixed by downloading the right driver.  Seems to w

  • Illustrator CS5 Color Picker Issue

    When selecting particularly bright colors in the color picker with CMYK, when i try to select the color, one box comes up with the color and a yellow triangle error sign and another comes with a much duller shade, and no matter what I do the duller s

  • How can I have C++ 4.2 and C++ 5.8 installed on the same box?

    I am involved in porting C++4.2 code to C++ 5.6 and I would like to know if I could have both compilers sitting side by side on the same machine. While using one compiler against the other, do I have to set any environment variables to tell the compi

  • Java plugin for Oracle 11iR9 Netscape client ?

    I am having NPX_PLUGIN_PATH problem with Netscape client(7.1)/Mozilla(1.4). I am using JDK 1.3.1_10. It seems it does not work. Does anyone knows what version of j2re is certified for Netscape client on Linux. Thanks !