How to read an external XML file in a indesign Plugin?

Hi All,
Can you please guide in reading an external XML file in a indesign Plugin in MAC system. I am an windows user.We are using this file for reading some inputs.
Thanks,
Daniel

Hello Daniel,
I am uncertain about the actual question. If you are developing a plug-in or otherwise interfacing with the guts of ID, I suggest asking the question in the SDK forum:
InDesign SDK Forum
Otherwise, what is it you are wanting to know concerning importing XML into InDesign?
Mike

Similar Messages

  • Help Required on Reading an External XML file in flex

    Hi Experts
    I want some help regarding flex.
    I want to read an external xml file in flex and want to show
    different datas in different components
    So bacically i need what is the procedure to call an external
    xml file and the procedure to catch the value of the xml tags and
    the option (options means ex: "id" or "type inside" "row" tag ) in
    side the xml file.
    Here is My xml file named "skn_organ.xml"
    <?xml version="1.0" encoding="UTF-8"?>
    <slide>
    <r>7</r>
    <c>8</c>
    <row id="A01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B04" type="g">
    <organ>Eso</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B05" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B06" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B07" type="g">
    <organ>Sbl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B08" type="g">
    <organ>Col</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    </slide>

    Hi sanjivsutar,
    Put your xml file under folder "assets", the application demo
    is as following
    ====================================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="init()">
    <mx:Script>
    <![CDATA[
    private var mainXML:XML;
    private var loader:URLLoader;
    private function init():void {
    loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onComplete);
    loader.load(new URLRequest('assets/skn_organ.xml'));
    private function onComplete(evt:Event):void {
    mainXML = new XML(loader.data)
    out.text += "xml loaded, using E4X syntax: \n\n";
    out.text += "Row 1: "+mainXML.row[0]+"\n"
    out.text += "Row 6: organ = "+mainXML.row[5].organ+"\n"
    out.text += "Row(id='D02'): link =
    "+mainXML.row.(@id=="D02").link+"\n"
    ]]>
    </mx:Script>
    <mx:TextArea id="out" width="400" height="300"/>
    </mx:Application>
    ======================================================================
    Jeffrey

  • How to run an external .exe file from an indesign pluging

    Hi,
          Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.
    Thanks,

    I'm actully writing data in PMString to a external txt file.
    another question..
    if i want to execute an action when the ok button is cliked how can i do it?
    whe i add a button(widget) i know how to handle it. please see my code.
    // Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).
    CDialogObserver::Update(theChange, theSubject, protocol, changedBy);
    do
    InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());
    ASSERT(controlView);
    if(!controlView) {
    break;
    // Get the button ID from the view.
    WidgetID theSelectedWidget = controlView->GetWidgetID();
    if (theChange == kTrueStateMessage)
    //if (theSelectedWidget == kEXTCODGoButtonWidgetID
    switch(theSelectedWidget.Get())
             case kEXTCODGoButtonWidgetID:
      this->ViewOutput();
      break;
             case kEXTCODFindButtonWidgetID:
      this->SaveLog();
      break;
    // TODO: process this
    } while (kFalse);
    I do two actions "SaveLog" & "ViewOutput()" using two buttons. But i dont know how to execute an action when the ok button is clicked...

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • How to read back a xml file

    hi all
    I have a problem reading back an xml file.
    What I want to do is to store sensors and some vi parmaters.
    To do it, I put the parmaters in a cluster, flaten it to xml and then write the xml file.
    till here, no problem.
    When I want to read back the xml file, it doesn't work with the way I do (I use unflaten and read xml file)
    The datas i read back are not those I want to take back from my xml file.
    Can somebody help me with this point?
    The 7 datas filed are :
    string
    string
    string
    string
    U16
    I32
    I32
    Please help me with this, I cant do anything till this problem is solved.
    Thanks in advance for your help.
    ps : hereafter, the xml file i have written with labview. (I have put it in .txt to be sure the upload works.)
    put it back in test.xml to wok whith it.
    Attachments:
    test.txt ‏1 KB

    Hi,
    there are two examples in Help >> Example Finder >> Fundamentals >> File Input and Output. One is Write Data to XML File and the other is Red Data from XML File. The first will write it and the second will read it back.
    I expanded th example with the String data and the value provided in your post and it work even with the '/' in the data.Message Edited by waldemar.hersacher on 04-06-2005 11:23 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How to read and write Xml file at client side using JavaScript !

    Hello,
    i am new to javascript.
    I have requirement to read and update XML file at client side.
    Will you please guide what could be the best way to read and update XMl file using javascript.
    Thanks,
    Zuned

    This is a Java forum,not a Javascript forum. Maybe you should ask here [http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s|http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s].

  • How to read from a xml file(in String format) using a java program

    hi friends
    i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
    thanks

            final DocumentBuilder db =  DocumentBuilderFactory.newInstance().newDocumentBuilder();      
            final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
            final Document document = db.parse(documentStream);

  • How to read a incorrect XML file using file adapter

    Hi',
    I have a XML file which is incorrect,
    example
    <?xml version='1.0' encoding='UTF'?>
    <emp>
    <empid>100</empid>
    <empname123>yatan</empname>
    </emp>
    now we can see that the XML data *<empname123>yatan</empname>* is incorrect,
    so if we have to read this type of XML in BPEL is it possible to read it or can we read it with some work around
    I have tried one way to achieve this,
    I read this XML with file adapter opaque read operation, and inside the BPEL process used Base64Decoder (Java embedding) to decode the
    opaque data to XML, it works to some extend. I am able to see the only the data like,
    100 yatan
    If I read a correct XML with same approach the data is a complete XML like,
    <?xml version='1.0' encoding='UTF-8' ?>
    <emp>
    <empid>100</empid>
    <empname>yatan</empname>
    </emp>
    can some one advice me how to achieve this, or some one has done this before
    thanks
    Yatan

    What initially I have thought is,
    once a incorrect file comes in this failed directory, some BPEL process should get invoked and feed the data to user, for this I thought of designing a BPEL process which will poll this failed directory, so for this we will need a empty BPEL process which will pick the file and then pass the data, the issue is I need to use here a opaque read and I dont know how to convert back the opaque (faulty XML) back to string.
    I have already tried to convert the opaque to XML using java embedding but for faulted XML only the data comes back in the form of string, where as need the complete XML back, can you suggest how to do this.
    thanks
    Yatan

  • How to Read,Write & Update XML File

    hi,
    How to read,create and update an XML file using DOM

    xml API's are there like jdom and stuffs...
    search in google : xml API's + java

  • How to insert External XML file content into XMLTYPE through Pro*c

    Could any one sugest me how to insert a external XML file content into Db
    into XMLTYPE datatype through Pro*c program.
    Thanks for any help...... who has done this
    Ghanta Tagore

    Hi
    After some good fight of 3 days, I have done it through Pro*c
    This is the way to handle this
    Buffer-->Temporary Clob-->XMLTYPE(using CreateXml)
    Pasting my piece o code to do this
    ===============
    OCIClobLocator *license_txt;
    varchar h_ttt[1024] = {'\0'};
    ub4 amt;
    int i;
    EXEC SQL ALLOCATE :license_txt;
    EXEC SQL LOB CREATE TEMPORARY :license_txt ;
    GetName(name); /*Gets Name to insert into name column in License Table*/
    for(i=0; i<4;i++)
    GetXMLL((char *)h_ttt.arr); /*Gets a string value of XML into this example*/
    /*<Tagore>Is From TCS Delhi</Tagore>*/
    /*This can be changed to get buffer from FILE */
    h_ttt.len = strlen((char *)h_ttt.arr);
    amt = sizeof(char) * h_ttt.len ;
    EXEC SQL LOB WRITE APPEND :amt FROM :h_ttt INTO :license_txt;
    EXEC SQL
    INSERT INTO license_table VALUES (:sss, :name, sys.xmltype.createXML(:license_txt))
    ================
    Thanks For ur Help
    Tagore Ghanta

  • Import external xml file in PDF using Livecycle

    I require sending some values in main xml file from the external xml file during sending mail on button click. Doing so, I want to read values from external file into a hidden field or send the external xml/text file as an attachment.
    1. Is there any feature in live cycle to attach multiple xml/text files in mail using button click?
    2. Is there any way to read an external xml file to pre-populate a textbox using javascript?
    Kindly help me to find out the solution.
    Thanks in advance
    Vikram Kumar

    Hi,
    1) You can do this with a script. But this script works only with the Acrobat Pro not with the Adobe Reader!!
    2) Sure.
    You open your form.
    Go to File | Form Properties |  Preview | then choose your xml-file
    Then you have to got to the textobject | mark this | go to "Object" | "Binding"
    Here you can bind the field: $record.PRINTJOB.PMSDATA.ObjectNameXML (You have to adapt this in the path in your XML to the field in the XML)
    If you make a preview you will see the value of the XML in your textfield.
    You can also script the databinding. You have to go to the initalize.event and write:
    this.rawValue = xfa.record.PathToYourFieldInYourXML.ObjectNameXML.value;
    Hope it will helps you,
    Mandy

  • Read data from xml files and  populate internal table

    Hi.
    How to read data from xml files into internal tables?
    Can u tell me the classes and methods to read xml data..
    Can u  explain it with a sample program...

    <pre>DATA itab_accontextdir TYPE TABLE OF ACCONTEXTDIR.
    DATA struct_accontextdir LIKE LINE OF itab_accontextdir.
    DATA l_o_error TYPE REF TO cx_root.
    DATA: filename type string ,
                 xmldata type xstring .
    DATA: mr      TYPE REF TO if_mr_api.
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
    WRITE xmldata.
    TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.
    LOOP AT itab_accontextdir INTO struct_accontextdir.
        WRITE: / struct_accontextdir-context_id,
               struct_accontextdir-context_name,
               struct_accontextdir-context_type.
        NEW-LINE.
        ENDLOOP.</pre>
    <br/>
    Description:   
    In the above code snippet I am storing the data in an xml file(you know xml is used to store and transport data ) called 'xml_accontextdir.xml' that is uploaded into the MIME repository at path 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'.
    The below API is used to read a file in MIME repo and convert it into a string that is stored in ' xmldata'. (This is just a raw data that is got by appending the each line of  xml file).
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
        Once the 'xmldata' string is available we use the tranformation to parse the xml string that we have got from the above API and convert it into the internal table.
    <pre>TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.</pre>
    Here the trasnsformation 'id ' is used to conververt the source xml 'xmldata' to resulting internal table itab_accontextdir, that have same structure as our xml file 'xml_accontextdir.xml'.  In the RESULT root of the xml file has to be specified. (In my the root is 'shiva'). 
    Things to be taken care:
    One of the major problem that occurs when reading the xml file is 'format not compatible with the internal table' that you are reading into internal table.  Iin order to get rid of this issue use one more tranformation to convert the data from the internal table into the xml file.    
    <pre>TRY.
          CALL TRANSFORMATION id
            SOURCE shiv = t_internal_tab
            RESULT XML xml.
        CATCH cx_root INTO l_o_error.
      ENDTRY.
      WRITE xml.
      NEW-LINE.</pre>
    <br/>
    This is the same transformation that we used above but the differnce is that the SOURCE and RESULT parameters are changed the source is now the internal table and result is *xml *string. Use xml browser that is available with the ABAP workbench to read the xml string displayed with proper indentation. In this way we get the format of xml file to be used that is compatable with the given internal table. 
    Thank you, Hope this will help you!!!
    Edited by: Shiva Prasad L on Jun 15, 2009 7:30 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 11:56 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 12:06 PM

  • How to import external XML file

    Hello guys:
    From this demo
    http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/#section2
    we know how to use a intrernal XML document. I know there are
    several way to load a external XML like:
    <mx:HTTPService
    id="loadTest"
    useProxy="false"
    showBusyCursor="true"
    resultFormat="xml"
    url="data/login.xml"
    />
    What I want to know is whether I could load a XML file
    directly, not use HTTPService and send. For a instance:
    [Bindable]
    private var login:XML = ("data/login.xml");
    or something like that. And then I could use login.user or
    login. pass .
    Now seems it is easy to control a intrernal XML data. I want
    to import a external XML file and use it like a intrernal XML.
    Thanks a lot

    You only have 2 choices: include the XML as part of the SWF
    using <mx:XML source="filename.xml" /> or load it dynamically
    using a data service such as HTTPService.

  • How can I set connection to external XML file with Dreamweaver to buiild AIR app?

    Hello,
    I try to do simple AIR app in dreamweaver. It's not problem
    to use static data. But I'd like to use dynamic data from external
    XML file. I try to use Spry and evrything works fine in web browser
    but i have problem with loading external XML data into my app in
    AIR. Can I simply transform my spry based html app into AIR?
    What should I add to do this?
    Pawel

    Daniel Lichtenwald wrote:
    What are the requirements and steps for arranging to receive this large file using File Transfer Protocol (FTP)?
    Usually, we don't speak of "receive" when using FTP, since the file is transferred from server to client, so it's more of a case of "download".
    At your end, it's simple. You use an FTP client; under SL, that includes Finder and Safari, so you don't even need to get any additional software.
    At the other end, it's more complicated; the 'sender' must set up an FTP server on his machine.
    Alternatively, you can set up your own Mac as an FTP server, and have the 'sender' connect to you with an FTP client and upload the file; but, if your Mac lives behind a router, then you have more work to do with the router settings.
    That's why it's much easier to use the file sharing services mentioned above -- if they are available in both sender's and receiver's locations. (Keep in mind that some countries block access to all those mentioned -- except perhaps <www.transfer.ro>, of which I know absolutely nothing.)

  • How to write to an XML file from JDE batch application?

    Hello everyone,
    I need to write data from a batch application to an XML file. I don't know how to use the XML business functions.
    I tried to use XML Publisher but the format is not the same as the client XML. The XML file has some customized format.
    I need to do it manually with business functions and ER. Please help me out.
    Some business functions I saw are Create XML document, XML Add element and XML Add attribute but the parameters are complex to
    use.
    Thank you very much.
    Edited by: Lovvy on Sep 8, 2010 2:58 AM

    The XML DB forum is better suited to your question.
    It also has a FAQ which details how to read and shred XML into tables as well as other common XML based questions...
    XML DB FAQ

Maybe you are looking for

  • IPod nano: first impressions after 2 days of use

    I recently got an iPod nano, 1GB, black. Just thought I'd post my experience with it so far: unbelievably small... aside from pictures on the internet I never saw a life-sized one. Nearly fits in the palm of my hand (but I've got big hands). Design:

  • Cant add music to my zen to

    I have the latest firmware the playfor sure version everything works shows up as an extra HD etc But when i go to drag and drop my files onto the player i get cant add file do not have permisson to create It it was all work fine untill then! I dont w

  • Is Oracle Identity Management 11g Patch Set 5 (11.1.1.6.0) reqd for Essbase

    In the Media pack Readme for parts required to be downloaded for different EPM products, Essbase has Oracle Identity Management 11g Patch Set 5 (11.1.1.6.0) for Microsoft Windows x86 (64-bit) listed. Can someone please tell me if this is a must have.

  • No Connection to Integration Builder (Local Data)

    Hi All, I am having problems in proxy configuration. When i run sproxy it says no configuration data found. I have done all the settings required for the same(think so). I have created LCRSAPRFC, SAPSLDAPI tcp/ip connection in the business system(R/3

  • I'm having trouble with my payment method payment type it's not accepting any of my cards

    Payment method/payment type will not accept any of my cards for payment it's saying my security codes are wrong there are available funds on both card