How the automatic placement of the xml text

How to import the xml file into indesign and automatic placement of text using javascriprt without model

Hai

Please try this:

var doc = app.documents.add ();

xmlRoot = doc.xmlElements.item var (0);

xmlRoot.markupTag.name = "Properties";

with (doc.xmlImportPreferences) {}

importToSelected = false;

importStyle = XMLImportStyles.mergeImport;

createLinkToXML = false;

allowTransform = false;

repeatTextElements = true;

ignoreUnmatchedIncoming = false;

importTextIntoTables = false;

ignoreWhitespace = true;

removeUnmatchedExisting = false;

importCALSTables = true;

}

xmlRoot.importXML (file (Folder.desktop + "/ sample.xml"));

Tags: InDesign

Similar Questions

  • How the XML element used in RTF PUBLIC/PRIVATE? I know how to hide columns in RTF, but do not know how to generate xml below way. Help, please.

    Hello

    I'm following link below to show/hide my columns dynamically. See "formatting of column.

    http://docs.Oracle.com/CD/E12844_01/doc/BIP.1013/e12187.PDF

    According to the doc element can be made in private/public.

    <items type="PUBLIC">
     <item>
      <name>Plasma TV</name>
      <quantity>10</quantity>
      <price>4000</price>
     </item>
     <item>
    

    And even can be used to hide the column with the help of State

    <?if@column:/items/@type="PUBLIC"?>
    

    MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?

    Here's the part of my XML code that I use in the definition of the data to RTF.

    <group name="GH3" source="QH3">
    <element name="COLUMN_HEAD3" value="COLUMN_NAME" /> 
    </group>
    <group name="GH4" source="QH4">
    <element name="COLUMN_HEAD4" value="COLUMN_NAME" /> 
    </group>
    

    I'm out like that.

    <LIST_GH3>
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4>
    <GH4>
    <COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    

    In order to use the logic according to the oracle document I want output like this.

    <LIST_GH3 type="PUBLIC">
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4 type="PRIVATE">
    <GH4>
    <COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    

    Should what changes I make in my XML to get the result of the execution as above? Help, please. Where should I make changes in the XML above? Name of the Group? Name of the element?

    I intend to use it under condition in RTF model to hide the column, but do not know how to set the column as PRIVATE/PUBLIC type in the XML output that is used to populate the data in the RTF while running.

    <?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
    

    Kind regards

    Patricia K.

    Hello

    Problem has been resolved. I used the value of the item to determine whether to show it.

    Kind regards

    Patricia K.

  • Handling former projects where the xml-text-files have been imported through the Panel of the chain.

    Hello Adobe support team,

    We're going to go from the Adobe flash professional CS 6 to animate CC and we have already purchased licenses for our developer team. In all our former software projects, we have imported and exported text to the screen (xml_files) through the string table to assign the ID. It was very uncomfortable for us, because all our projects are multilingual. Now, we read in the animate using the channel Panel is obsolete with CC to animate. So our problem is how to manage our current programs where all text files are based on the Panel of the chain.

    Find out here: How can I load external XML content to my HTML5 doc?

  • How the XML message parssing

    Hello

    How can I analyze Xml message below, I tried to use the query below.

    I am unable to get it.

    
    

    You are missing the namespace declaration:

    (and you do not have to repeat the full path in the COLUMNS clause)

    SQL > WITH insert_table LIKE)

    2. SELECT XMLTYPE (')

    "" 3 http://www.testing.com/B26/event/MASTER/HHDdisTT "xmlns: XS ="http://www.w3.org/2001/XMLSchema-instance">".

    4

    5 20130904

    6

    7

    8 ') the_data

    9 double)

    10. Select valueDate1

    11 insert_table,

    12 xmltable)

    13 xmlnamespaces (default 'http://www.testing.com/B26/event/MASTER/HHDdisTT'),

    14 ' / HHDdisTT'

    15 in PASSING temp_table.the_data

    16 COLUMNS

    17 path of varchar2 (100) valueDate1 ' valueDate1/value') x;

    VALUEDATE1

    --------------------------------------------------------------------------------

    20130904

  • How to change content/type application/xml, text/xml?

    Hi gurus B2B.
    Now that I've worked on the transfer of files. Now, I tried to post the same document on an HTTP URL.
    I see in the headers that the
    Content-Type = application/XML
    However, I need the Content-Type text/XML

    Where can I get it changed?

    Published by: user773213 on April 8, 2009 04:48

    If you use AQ together the content as part of QA header type (add below in the enqueue.properties).

    actionName = CONTENTTYPE:text / xml;

    concerning
    Nebot

  • Check the XML writer, how to work with signature

    We intend to use the recorder XML record for our paycheck, we have a USB attached to a HP 4510 with signature bmp on it. Could you help me understand how the XML report can talk to the printer to print the signature on the right place. I did a lot of reading and learned something about GhostScript, pilot pasta and so on. But I feel little difficult to understand how all these components work together.

    I used to work on a project that allows to print on a printer PCL writer check rdf, it was easy to use PCL to tell the printer how to print the signature, but as the output of the XML check PDF writer, I'm really lost how to do this.

    Thanks in advance for your help.

    -Bill

    Bill,

    XMLP does not produce the PCL output you have to shoot a .bmp of signature of a SIMM card or a USB drive connected to a printer, the output is just in PDF format. You can work around this by mapping a USB (plugged into a PC of the Department of the AP, let's say the Manager) to a specific URL, then coding your model to get the signature of this URL. If USB is not inserted into the PC at the time where controls are formatted, the signature could not be found and the model can be made to show a stamp "NULL" instead. The basic approach is detailed on the blog of Tim Dexter, [http://blogs.oracle.com/xmlpublisher/2007/11/hard_check_print_security_alte.html].

    Another option is Evergreen, a solution of the third party who will transform the PDF to PCL and pull off your printer signature (like you had before). [http://blogs.oracle.com/xmlpublisher/2007/11/hard_check_printing.html]

    A final option is to just the signature on the server in the directory $OA_MEDIA. A couple of my former clients who asked for the security of USB/SIMM card eventually just go with this approach, because it was more simple and secure enough for their needs.

    Hope that helps,
    Glen

  • Behavior of the XML in Flex vs Flex/AIR class

    Hi, I created a small application without AIR which simply wraps the text value of a TextArea in a XML tags using the XML class (and the 'escape()' function) as shown in the attached code (see "application not PNEUMATIC").

    The resulting XML is as follows (when seen in the debugger and recorded by the PHP script):
    < list >
    < element >... .text value of TextArea... < / point >
    < / list >

    In my real application, I then sends this via an HTTPService to a PHP script on my server. The PHP script receives the XML code in its entirety, no problem.

    When I wrote an equivalent (same code) AIR application (see "AIR Application" in the attached code), the XML formatting becomes (when seen in the debugger and recorded by the PHP script):
    < list >
    & lt; point & gt;... text value of TextArea... & lt; / point & gt;
    < / list >

    When you send this through the HTTPService, the parent < list > tag is removed, which causes the PHP script to fail.

    Is this a normal behavior and is there a way to get around this? I looked in the forums, but any reference to this strange behavior between AIR and no AIR Flex change is not found.

    Anyone else has the same problem?

    Thank you

    Marc

    Hi rtalton and thanks for the thoughts. This got me thinking about how the XML class constructor and appendChild methods should be called and found the question.

    It seems that appeal to the "appendChild" method AIR produces a result different than when not in the AIR, which is curious in itself.

    However, I changed my code to be 'good' according to the documentation, and it worked under AIR and airless. Here's what I changed:

    The appendChild method is now called as follows:

    list.appendChild ({escape (taText.text)});

    The quotes have been removed and I'm dealing is no longer the XML as a string.

    So, while I was there, I changed the call to the constructor as follows:

    list = new XML ();

    Same here, no longer treat the XML as a string.

    Thank you

    Marc

  • Crop the text of the XML... (how to add a read more link)

    I'm stuck... I want to have a read more link after 30 word in each paragraph of loading the xml file... Any help?

    I don't know even how to start with her... I have 5 video clips with instance name mc1, mc2, mc3, mc4 mc5. When I turn they load the content of the XML in the toolTipMC.

    Code: -.


    var x: XML = new XML();

    x.ignoreWhite = true;

    images of the var: Array = new Array();
    var titles: Array = new Array();
    Details of the var: Array = new Array();
    var urls:Array = new Array();

    x.onLoad = {function (success)}
    var locs:Array = this.firstChild.childNodes;
    for (j = 0; j < locs.length; j ++) {}
    images ["MC" +(j+1)] is locs [j].attributes.image;.
    titles ["MC" +(j+1)] = locs [j].attributes.title;
    Details ["MC" +(j+1)] = locs [j].attributes.detail;
    URLs ["MC" +(j+1)] = locs [j].attributes.url;

    }

    }

    x.Load ("Data.xml");


    myBtn.onRollOver = function() {}


    toolTipMC.img.imgHolder.loadMovie (images [this._name]);
    toolTipMC.tip.text = title [this ._name;]
    toolTipMC.detail.text = details [this ._name];

    };

    really, I don't think you should use that but, the following returns a substring which includes 29 spaces and about 30 "words":

    function textto29F(s:String):String {}

    var spaceNum:Number = 0;

    for (var i = 0; i)<>

    If (s.charAt (i) is"" ") {}

    spaceNum ++;

    {if(spaceNum==30)}

    Return s.substr(0,i);

    }

    }

    }

    s contains less than 29 places

    return s;

    }

  • How can I place an indd - just the text file?

    Hello.

    This is a snippet of my code.

    var tfiImport = File("C:/Users/Me/Documents/YS/Exported Stories/YS_full_pg.indd");
            tfYS[0].insertionPoints.item(-1).place(tfiImport);
    
    

    I'm trying to import an indd file in a pre-existing text block. The framework becomes excess, because the indd file is placed in actual size.

    The indd is a text file with different styles applied. I just want retrieve this text with styles and place it in my text, auto to flow if necessary.

    How can I do?

    Any help would be appreciated.

    Hi SK,

    you would open the InDesign document and duplicate the text at your insertion point.

    Both documents are open.

    The insertion point where you want to "place" the formatted text is selected.

    There is at least a block of text with a paragraph in the document where you want to duplicate.

    Example:

    var targetDocument = app.documents[0]; // The active document
    var sourceDocument = app.documents[1];
    
    var targetInsertionPoint = app.selection[0].insertionPoints[0];
    
    sourceDocument.textFrames[0].paragraphs[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Example:

    To duplicate the whole text of a story where you know a block of text of this story:

    sourceDocument.textFrames[0].parentStory.texts[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Search for the text in the documentation for DOM object and its methods.

    Adobe InDesign CS6 (8,0) object model JS: text

    Also app.open () method:

    Adobe InDesign CS6 (8,0) object model JS: Application

    Uwe

  • By creating a form that has several text boxes to a single character on the same line, how can I get the cursor to go in the next text box automatically after inserting a character?

    By creating a form that has several text boxes to a single character on the same line, how can I get the cursor to go in the next text box automatically after inserting a character?

    Create a text field and use the option 'comb n characters.

  • How to replace a part of the structure XML text with an image.

    I need to replace specific items within my XML structure with a picture and I have problems using the existing XML structure for that.

    I was expecting something as simple as myDoc.xmlElements [0] .xmlElements [0] .xmlElements [0] .silence = new File ("MyImgPath.ext");

    I can use GREP to search the text of each item in my XML structure I want to replace the text, place the image and the result is what I want.  However, in the rare case where the same text as the header, is in one of the paragraphs he too would be replaced by the image and we can have.

    My XML structure is slightly more complicated, but this example contains the necessary elements:

    > Root

    > Group

    > Header

    > Article

    Well, I managed to find a solution to my problem.  I don't know if it's the best way to go about this, but it works for me.

    myDoc var = app.open ('/ / the/path/to/my/doc ', OpenOptions.OPEN_COPY);

    var myDoc.xmlElements = myXML [0] .xmlElements [x] .xmlElements [0];

    var myImg = new FIle ('//path/to/my/image');

    myXML.contents = "; To clear all the text

    myDoc.select (myXML); Selects the xmlElement

    myDoc.selection [0] .insertionPoints [0] .place (myImg); Place the image in the selection

  • [JS/CS6] How can I reach or remove text remains which is stuck in the XML Structure

    Sometimes, the remnants of the deleted text are found at a parent level or root of the XML structure. How can I 'find' scripts?

    Capture1.PNG

    Above, a sample image. The root should be just '<>' and there may be hundreds of items marked under the root, which should not be deleted. The only thing that needs to be removed is the text that shows inside the element root, because it is not in use anywhere.

    To fix it as I want, I can manually drag the document root, enter the editor mode (Ctrl + Y) and delete the text. I do in the editor mode to avoid the deletion of all the other child nodes of the root, which happens easily if I delete all the text in the textframe. When I delete the textframe, after you remove the top-level text which has been 'stuck' before, everything is nice.

    I'd like one to write a script that deletes the text which has got stuck in the root of the way which is shown in the picture (the root is not in the page, it should be empty in case I'm on).

    Defining the content of the xmlElement to "translates in all of the sub-elements being deleted (not what I want).

    Thank you

    Andreas

    It of not elegant, but should work. I can't think of a way to distinguish the 0xFEFFs that "contain" children of other 0xFEFFs that you may have in the history of the root, so that would leave all the ones you hang out.

    var root = app.activeDocument.xmlElements[0],
        i, character;
    
    if (root.parentStory.constructor.name === 'XmlStory') {
        for (i = root.xmlContent.characters.length - 1; i >= 0; i--) {
            character = root.xmlContent.characters[i];
            if (character.contents.charCodeAt(0) !== 65279) {
                character.remove();
            }
        }
    }
    

    Jeff

  • How can I place a text box on the other in the left column of my head?

    Greetings! Below, you will find something that I worked on a link. Now I have to change the left side of the header that contains the text box "Hiring" in a box on top of each other using the same amount of space. I also need to make these 2 boxes pop out when you click them but only one at a time. How can I place a text over another box using the same amount of space without any screwing? I could also use some help getting these images that say 'HIRE' and 'FIELD NEWS' inside boxes instead of above them.

    Thank you in advance. http://www.bestmarketingnames.com/xbanneredit.php

    Despite the CF McBlob comments that I share, I'll try to answer your question immediately. Just add this new markup above your other div scroll like this:

  • How the text box will automatically solve a margin decline (manuscript Prep)

    I'm trying to prepare a manuscript for self-publishing (what have I got myself?) and hit another wall.  After setting the margin of the 200 page manuscript (all 200 pages imported from MS Word doc as a text image area), I decided that I needed the smaller margins.  After that, I noticed that the words/text box has not been changed accordingly: the words overlap the new margins.  As a notice of InDesign/stupid, I can't understand a how do I get the text box to fit new, smaller margins of pages at the same time (and I believe there is a better way to manually edit each page individually).

    Advisor?  Any help appreciated.

    Cancellation: If you know a manuscript InDesign (subject doesn't matter) which is in the public domain, I'd like to have the link/location.  I could learn a lot from an example of 'real '.  Thanks in advance.

    If the document is not sufficiently complex already make a new document 1 page with correct and verified margins "master text frame. Taking command or control and passage click on the margin to release your text block. Empty all your text in the image. It will automatically add pages as needed and adjustments as it will be a snap. To work with InDesign, the way sounds are that you will pay with impatience.

    This article can help

    http://help.Adobe.com/en_US/InDesign/CS/using/WSa285fff53dea4f8617383751001ea8cb3f-6faaa.h tml

  • How to make src of the image of the place holder something xml file

    Hello
    im doing xslt on xml file and I want to store the path to the image on an element of the xml file and display the image on the page how?
    I can write about the CBC textbox like any expression xml xml string how?

    > im doing xslt on xml file and I want to keep the image on an element path
    > XML file and display the image on the page how?
    > can I write on the CBC textbox like any expression xml xml string how?

    I'm a little confused, but if you transform XML via XSLT, then
    You must create the link of the image via the XSLT file:

    Assuming that you store in an XML file name of the image node
    "imageFileName":

    -Darrel

Maybe you are looking for