XML: import only the body element...

I need import only the body element...
var myXMLFile=File.openDialog("Choose XML.......");
myDoc.importXML(File(myXMLFile.body));
But not work...!!!
It this possible?

It this possible?
Not like that!
What you've written doesn't make much sense:
var myXMLFile=File.openDialog("Choose XML.......");
myDoc.importXML(File(myXMLFile.body));
In this code, myXMLFile is a File object. File objects do not have .body properties, so myXMLFile.body is not valid.
And even if a File object did have a .body property, it would presumably be some sort of XML content inside the File. But the File() constructor takes a string argument that is a filename. So File(myXMLFile.body) wouldn't work either!
I think you should take a step back and make sure you understand the basics before you try to put them together like this.
Since the importXML() method only takes a file, a solution is to read the XML file, pull out the <body/> element, write it to another file,and then call importXML() on the new file.
Alternatively, you can create an XSLT transformation and set doc.XMLImportPreferences to mandate its use. If you're not familiar with XSLT, learning it may not be appropraite for this task.
But perhaps your requirements are overly restrictive -- why can't you import the whole file and then only instruct InDesign to deal with the body element?

Similar Messages

  • Xml content in the body of the email

    Hi... I am using JDev 10.1.3.4 . My requirement is to get xml content in the body of the email. please throw some light on this.

    Hi
    Thanks al for ur replies.
    Actually my requirement is to send email with some xml data in the body (like failed records to show dat dese are all the records without necessary information).
    @Eric,
    Using ora:getContentAsString(XMLElement) i only received a blank email without any content. I even tried to write the xml content in a file and used ora:doc() . Even then the body of the email is blank. Dunno wat i am missing here.
    @pavan4s
    I am literally new to bpel. Can u please elaborate or send some links to use xsl in email body?
    Edited by: friendsforever on Oct 11, 2010 2:35 AM
    Edited by: friendsforever on Oct 11, 2010 2:36 AM

  • HT204150 My Contact from ICloud imports only the name but not every thing else. But that only happens with my own card

    My Contact from ICloud imports only the name but not every thing else if I want to import it to Contact on my Mac. But that only happens with my own card.
    Before, my V-Card in Contacts on my Mac was ok, but now it disappeared. When I try to import it from ICloud only my name appears.
    Can anyone help me? Thanks

    The backup of your iPod Touch would include your camera roll photos.  Restoring the backup to another iPod Touch or iPhone would recover them.  Photos will not be restored by restoring the backup to an iPad.
    Note: Apple deletes iCloud backups after 180 days of inactivity so be sure to do this before then.

  • How to remove only the last element of spreadsheet string

    I use path to string option to store image path into database and while retrieving the string is again converted into path but it gives out an error as the output of array to spreadsheet string gives out a tab at the end which is unable for the IMAQ read file to recognise.but when i use the path of the image directly into IMAQ readfile the image is opened . so how to remove the tab only at the end of output of the spreadsheet string(whose length can vary)? I have also attached my program with this.
    Attachments:
    retrieve_images_from_DB.vi ‏65 KB
    file_path_to_db_(images).vi ‏40 KB
    create_table_for_images.vi ‏45 KB

    indhu wrote:
    > Thanks for your reply!
    > But my problem is to remove only the last element(which is a tab or an
    > alphabet) from a spreadsheet string of any length.
    If you just want to remove the last character of a string just use the
    String Size function reduce the result by one and wire it together with
    the string to the Split String function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • WebService problem: only the first element of a string array is returned

    Hello,
    i did the J2EE QuickCarRental tutorial and extended it by some features: I created another entity bean and implemented four new methods in the QuickOrderProcessor. Then i deployed it as a WebService and accessed it using the Visual Composer.
    Everything works fine except the return value of one WebService method. I created a method with the return value String[]. But the Visual Composer reads it as String. Only the first element of the resulting string array is displayed. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the whole string array with all its elements. What did i wrong?
    Another problem is that after deploying the J2EE-Application with new WebService methods the changes are not visible inside the visual composer. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the changes. Do i have to restart the WebService system in the portal content? If yes how can i do that?

    Here are details about setting up and using web services and some examples:
    /people/prakash.darji/blog/2006/10/10/external-web-service-proxy-configuration-for-visual-composer

  • Import only the rows of emp table from Test into emp table of Prod

    hi,
    Test Instance:
    =========
    I have a table "emp". I want to take export of it.
    Prod Instance:
    =========
    Table with name "emp" already exists.
    I want to import only the rows of emp table from Test Instance into emp table of Prod Instance.
    regards,
    charan

    Charan,
    Set the import command IGNORE=Y
    Importing into Existing Tables
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023662
    Regards,
    Hussein

  • Importing only the metadata

    Hi,
    I have a full database dump and I would like to import only the metadata, i.e., only the objects structure.
    My database is an Oracle 8i versioned. I used the following:
    imp system file= log= full=y rows=n
    kindly let me know if I am wrong or is there any other way to do this.
    With the above statement only the schemas are created but there are no objects at all.

    rp0428 wrote:
    Did you specify TABLES=* to import all tables?import operates in 1 of 3 modes
    a) FULL=Y
    b) OWNER=<schema_name>
    c) TABLES=
    & they are mutually exclusive

  • How to have iPad (iOS 5) import only the JPEG from a RAW JPEG pair?

    I have an iPad 2 16 GB, running iOS 5. I also have a Canon EOS 7D. I purchased a CF Card Reader for the iPad (see http://store.micgadget.com/card-readers/280-ipad-2-cf-card-camera-connection-kit .html) so that I can view and edit photos quickly in the field, without having to lug my laptop around. To make this easier, I set my camera to shoot RAW+JPEG. I shoot with the smallest JPEG files possible, still a relatively large for the iPad 2,592x1,728, with the idea that I'd only import the JPEG files to the iPad, but still have the RAW files to work with when I get back to my computer. This works great with one exception: the iPad doesn't allow me to import only the JPEG files, but grabs the RAW files along with them. As you can imagine, this fills up my iPad rather quickly, and takes quite a bit longer to import than if it only grabbed the JPEGs.
    So here is my question: How do I have my iPad import only the JPEGs from the RAW+JPEG pairs on the memory card?
    One workaround that helps slightly. If I connect my iPad to my computer after the import, I can go in via Image Capture, select all the RAW images and delete them, leaving the JPEGs behind. This is an underwhelming solution, but does save space after the fact.

    What you are seeing is how Safari works now in iOS 5. There is no way to get that icon in Safari now. There other much better browsers available in the App Store. Look at iCab Mobile, Mercury, Atomic, ....
    I have been running iOS 5x for so long now, that I don't even remember if that icon did appear in earlier iOS versions

  • How would I get the Body element background to open at  the scale of the browser window

    How would I get the Body element background to open at  the scale of the browser window? I hear that by using an HTML tag or CSS rule I could scale a background that is placed in the body element without using javascript is this true? 

    The most reliable solution is to use small image slices or tiles and repeat them down and across the page or container division.
    CSS EXAMPLE:
    body {
         background: url(your_image.jpg) repeat;
    More on background images:
    http://alt-web.com/Backgrounds.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • HT201302 How to import only the newest iPhone photos to iPhoto library/Mac

    I have an iPhone 4s and every time I connect my iPhone to my Mac it downloads all the photos.
    How do I import only the newest photos? To have to check what I already have in albums and select only the latest would be very
    time consuming. There must be an easier way.

    When iPhone is connected and selected in computer iTunes, in Photos tab >
    in Selected albums, Events, and Faces, and automatically include > select "the most recent Event"

  • Can you import only the audio?

    In the latest version of FCPX, is there a way to import only the audio and not the video (I'm dealing with AVCHD files, if that matters)?

    No. But, once you get the media into your event browser there is an easy way to bring just the audio to your timeline.

  • XML import only creates one record at a time

    Hi All,
    I have an XML import map that automatically imports data into main product table. It's working fine when the XML file has only one main record. When it has more than one record, the import manager and import server can only import the last record in the file and skip the rest.
    I already checked the record matching tab. It correctly shows that all records will be created and 0 will be skipped. Even the log file indicates all records are created after I execute the map. Yet, when I try to look for them in the data manager, I can only find the last one. If I execute the map with the exact same file again, it will create one more record again and skip the rest.
    Someone else posted the same question a while back: Import map issue one record at a time. But it was never answered. Does anyone else have this issue? Is this a MDM bug?
    Thanks,
    Kenny

    Hi Kenny,
    Please refer to the note below:
    Note 1575981
    Regards,
    Neethu Joy

  • Is there a possibilty to import ONLY the RAW pictures via Organizer and let the jpeg's on the camera?

    When I import the pictures from the camera (Olympus OMD Em-1): can I only import the RAW-pictures into the organizer?
    Hope for help I'm not very good in englisch sorry.
    txs
    Alexandra

    Alexandra,
    The downloader module of Elements does not provide an option to filter imported files by their type (jpg or raw). You can only filter videos from still photos. I agree that would be a welcome addition!
    What you can do instead:
    - use your OS (explorer / finder) to import the files to your computer via your card reader : you can order your files to import by extension (jpg, CR2, NEF...) and select the raw files. Then use the 'Import' feature of Elements to import from 'Files and Folders' (that 'registers' the files in the catalog).
    - Or you can use the standard Element download and delete the jpegs afterwards. Not very elegant, but that works.
    - Or you can use the 'Import' feature of Elements and choose from 'Files and folders' instead of From camera or card reader, then browse to the card reader. The card reader will be considered as a separate drive. You can select only raws in the import dialog by setting the file order to file extension (CR2, NEF...) instead of file name. You select the first item, then Shift Click on the last one. Only raws are selected. Now, be careful to have the checkbox to 'copy' the files ticked. Otherwise, Elements would consider your pictures to be on a removeable drive. The picture files will be copied on your computer in a special 'photo from removable drives' subfolder.

  • How can I remove only the middle elements from a 2-D array?

    Hello all!
    We have had an issue at my work where some of our graphs featuring a Gaussian curve have an unusual rectangular distortion in the middle of the curve (sorry that I have no image to show you, the error is before my time at the company, and I've been asked to find a solution before it happens again). Basically, what should be a Gaussian curve is leveling off briefly and looking like a rounded square wave. We know what causes the distortion, so I only wish to remove the middle part, giving it the appearance of a Gaussian. It's odd, but it actually offers a good approximation of what we want. The graph is made from a 2-D array of Double values, and we can estimate the size of the leveled-area, so I figured that removing the middle elements from the graph would accomplish this. Does anybody know a way I can accomplish this?
    -Gobble
    LabView 8.5.1

    Raven,
    Thank you very much, I'll try that!
    -Gobble
    LabView 8.5.1

  • Is there a way to import only the Address Bookfrom OE into TB? When I started to import my full data, I clicked Cancel, TB crashed, & my Address Book vanished.

    Hi, I am in the process of migrating from Outlook Express 6 to Thunderbird. Thunderbird made the migration very easy, a click of an "Outlook Express" radio box selection for import. But then I made it hard on myself by deciding I wanted to fix an OE .dbx folder-file (make it importable, previously not imported likely because it was marked "read only" and then re-import. I started to re-import OE into TB but then got nervous when I saw everything was importing, not a single dbx folder-file I wanted to fix. I clicked "Cancel" in TB, and then, when I later opened TB, noticed that my Address Book now is empty. It was definitely full before. Any ideas how to import strictly my contacts again? I am thinking of importing my entire OE data again if the answer to that post is that the re-import will not result in double OE line items. If I re-import all of OE, my Address Book should reappear, too, right?

    Oops, I found the answer to my question. Great knowledge base! I had originally imported via the automatic popup dialog box that appeared when I installed TB, and didn't absorb at the time that there would be a way to do an import later, after TB install, too, and even for specific parts of OE (address book vs. mail messages, etc.).
    I pasted the link to the "Migrate to Thunderbird" page that includes how to migrate just an Address Book from OE, but the following is all that pastes in: 9723729938
    I have typed out the link here:
    en.flossmanuals.net/thunderbird/migrating/

Maybe you are looking for

  • Need help: CSS in IE  (grrrr)

    Okay. I built a site that is not loading correctly in Win/ IE. site is www.integrityrealestategroup.com Supposedly, there's an issue with 1) the nav bar at the top not loading correctly and 2) the content flowing out of the grey bar at the bottom I d

  • Secuential field

    Hi experts! I'm making a new Z table and I need a secuential field in it. Do u know if is there any kind of element in SAP to define a field as auto secuential? It would be somtething like this: 1 2 3 4 5 6 7 Or I have to calculate the value of the f

  • What is the "reply-to address" in the email config...

    Hi Since I failed miserably to get gmail working via POP3 on my 6280 (apparently because this handset does not support SSL on POP3 (which gmail requires) only TCP/IP, although neither vodafone or nokia cust serv could tell me this), I have resorted t

  • How do I play an .flv file ?

    I got an email with a .flv attachment.  I understand this is a flash file. What do I need to do to play this file? Windows XP 32 bit Your site check says I have flash version 10.1.53.64 I never explicitly installed flash, I understand it came bundled

  • Can JDBS calculate the cost of a query ?

    In the past I worked with DB2 and I know that it has a feature that can calculate the cost of a query before executing it. Now I have to work with sybase. I would like to know if there is any way to get that cost in order to decide whether to execute