Place XML into Library element

Hi,
I am automating the process of placing library element as anchored element.
The actual task is, I have an sidenote text in the indesign document. These text also contains   XML tags.
I want to place this sidenote text into an library item called "MN1". This library item is a group of Picture and Textframes. Then this library item is placed into the document as anchored element.
With my script, I am able place the XML into library item. But the problem is, I am not able to place this library item as anchored.
My script is:
#target indesign-6.0
var myDocument = app.activeDocument;
sideart();
// IMPORT BOXES INTO PAGES ON PASTEBOARD AREA
function sideart()
    var myCurrentLib = app.libraries.item(0);
    app.findGrepPreferences.findWhat = "(\\{\\{SS (.*?) (.*?)\\}\\})((.*\r)*?.*SE (.*?)\\}\\}\r?)";
    var found = myDocument.findGrep();
    for  (var i =0; i<found.length; i++)
        found[i].select(SelectionOptions.replaceWith);
        var myLibName1 = found[i].contents.split(" ");
        var mySidID = myLibName1[1];
        var myLibName2 = myLibName1[2].split("=");
        var myLibName = myLibName2[1];
        var myRuleName1 = myLibName1[3].split("=");
        var myRuleName2 = myRuleName1[1].split("}}");
        var myRuleName = myRuleName2[0];
        app.cut();
        app.selection = null;       
        myAsset = myCurrentLib.assets.item(myLibName.toString());
        var libItem = myAsset.placeAsset(app.documents[0]);
        app.select(libItem[0].textFrames[0].parentStory.insertionPoints.item(0));       
        app.paste();
        libItem[0].textFrames[0].fit(FitOptions.frameToContent);
        app.findGrepPreferences.findWhat = "\\{\\{SE (.+?)\\}\\}\r";
        app.changeGrepPreferences.changeTo = "";
        libItem[0].textFrames[0].texts[0].changeGrep();
        app.findGrepPreferences.findWhat = "\\{\\{SS (.+?) (.+?)\\}\\}";
        app.changeGrepPreferences.changeTo = "";
        libItem[0].textFrames[0].texts[0].changeGrep();
        app.findGrepPreferences.findWhat = "";
        app.changeGrepPreferences.changeTo = "";
        app.findGrepPreferences.findWhat = "(\\{\\{SR " + mySidID + "\\}\\})";
        var foundref = myDocument.findGrep();
        if  (foundref.length > 0)
            /// HERE I WANT TO PLACE libItem AS ANCHORED ITEM WITH THE OBJECT STYLE APPLIED TO IT.
        else {
            alert ("There is no Side art reference tag with ID: "+ mySidID);
My Indesign file look likes:
Factors Affecting the Direction of Transport{{SR ch04mn1}}
{{SS ch04mn1 L=MN1 O=TEST11}}The section on single-subject design was written by Dr. Stephen W. Stile.{{SE ch04mn1}}
In Chapter 3, we saw that the reactant and product molecules in a metabolic reaction have different energies. We also saw that the energy change of a reaction—the difference between the reactant and product energies—determines the direction of the reaction and whether it proceeds spontaneously or requires energy. In the following section we see that similar principles govern the transport of molecules across membranes.
Please suggest how to place grouped library item with XML as anchored item.
Thanks,
Gopal

Hi,
Upgrade to 9.2.0.3, until I upgrade I could not get the web-dav upload to work at all.
The only problems I've had with this is if I logged on to web-dav as a different user from that which I registered the schema with. One thing I have noticed, is that the file size is shown as being 0 when the xml has been shredded successfully.
And the previous answer is right, if you use FTP you might see better error messages.
Hope it helps,
John

Similar Messages

  • Can't place XML into defaultTable using WinExplorier

    Hi,
    Oracle 9.2.0.1
    My sequence of operations:
    1. Register schema - successfully - can see it using WinExplorier; defaultTable and types were created;
    2. Using SQLPLUS can place any XML corresponding registered schema into repository and can see it into
    defaultTable.
    3. BUT CANT PLACE THE SAME XML USING WinExplorier (WEBDAV) !! Using drag-and-drop operation xml just
    can be inserted into repository, but doesn't appear
    inti defaultTable.
    It looks like XMLDB can't see xml schema in registered path.
    Has anybody run into the same problem ?
    Thanks in advance
    Viacheslav

    Hi,
    Upgrade to 9.2.0.3, until I upgrade I could not get the web-dav upload to work at all.
    The only problems I've had with this is if I logged on to web-dav as a different user from that which I registered the schema with. One thing I have noticed, is that the file size is shown as being 0 when the xml has been shredded successfully.
    And the previous answer is right, if you use FTP you might see better error messages.
    Hope it helps,
    John

  • XML into one string element

    Hello,
            In Graphical mapping, Could anyone pls tell me in detail about how to achieve One whole xml into one string element. This XML file i want to send to DATABASE.

    Thi blog might be of some help
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

  • How do I import Aperture Library into Photoshop Elements 12?

    New to Photoshop Elements 12.How do I import Aperture Library into Photoshop Elements 12?

    You would really need to export copies from the Aperture database, to folders on your hard drive and then import them into Organizer.
    Or continue with Aperture (don’t use Organizer) and simply send photos to the Elements Editing app as required.

  • Obtain  name into name element (XML schema)

    Hello abappers,
    I need obtain the next code XML schema
    <xs:element name='AuditFile'>
        <xs:complexType>
          <xs:sequence>
            <xs:element ref='Header' />
            <xs:element ref='MasterFiles' />
            <xs:element name='GeneralLedgerEntries' />
            <xs:element name='SourceDocuments' />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    The code:
    l_element_Audito           TYPE REF TO if_ixml_element,
    l_document        TYPE REF TO if_ixml_document.
    l_element_AuditFile            TYPE REF TO if_ixml_element,
    l_element_GeneralLedgerEntries TYPE REF TO if_ixml_element,
    l_element_SourceDocuments      TYPE REF TO if_ixml_element,
    l_element_Header             TYPE REF TO if_ixml_element,
    l_element_MasterFiles             TYPE REF TO if_ixml_element,
    Fill root node with value AuditFile
            l_element_AuditFile  = l_document->create_simple_element(
                        name = 'AuditFile'
                        parent = l_element_Audito ).
    Create element 'Header' as child of 'AuditFile'
            l_element_Header  = l_document->create_simple_element(
                        name = 'Header'
                        parent = l_element_AuditFile  ).
    Create element 'MasterFiles' as child of 'AuditFile'
            l_element_MasterFiles  = l_document->create_simple_element(
                        name = 'MasterFiles'
                        parent = l_element_AuditFile  ).
    Create element 'GeneralLedgerEntries' as child of 'AuditFile'
            l_element_GeneralLedgerEntries  = l_document->create_simple_element(
                        name = 'GeneralLedgerEntries'
                        parent = l_element_AuditFile  ).
    Create element 'SourceDocuments' as child of 'AuditFile'
            l_element_SourceDocuments  = l_document->create_simple_element(
                        name = 'SourceDocuments'
                        parent = l_element_AuditFile  ).
    and with the this code obtain:
    <xs:element name="AuditFile">
    <xs:complexType>
    <xs:sequence>
      <xs:element ref="Header" />
      <xs:element ref="MasterFiles" />
      <xs:element ref="GeneralLedgerEntries" />
      <xs:element ref="SourceDocuments" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    Can you help me, please?
    Cordial greetings.

    Hello abappers,
    I need obtain the next code XML schema
    <xs:element name='AuditFile'>
        <xs:complexType>
          <xs:sequence>
            <xs:element ref='Header' />
            <xs:element ref='MasterFiles' />
            <xs:element name='GeneralLedgerEntries' />
            <xs:element name='SourceDocuments' />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    The code:
    l_element_Audito           TYPE REF TO if_ixml_element,
    l_document        TYPE REF TO if_ixml_document.
    l_element_AuditFile            TYPE REF TO if_ixml_element,
    l_element_GeneralLedgerEntries TYPE REF TO if_ixml_element,
    l_element_SourceDocuments      TYPE REF TO if_ixml_element,
    l_element_Header             TYPE REF TO if_ixml_element,
    l_element_MasterFiles             TYPE REF TO if_ixml_element,
    Fill root node with value AuditFile
            l_element_AuditFile  = l_document->create_simple_element(
                        name = 'AuditFile'
                        parent = l_element_Audito ).
    Create element 'Header' as child of 'AuditFile'
            l_element_Header  = l_document->create_simple_element(
                        name = 'Header'
                        parent = l_element_AuditFile  ).
    Create element 'MasterFiles' as child of 'AuditFile'
            l_element_MasterFiles  = l_document->create_simple_element(
                        name = 'MasterFiles'
                        parent = l_element_AuditFile  ).
    Create element 'GeneralLedgerEntries' as child of 'AuditFile'
            l_element_GeneralLedgerEntries  = l_document->create_simple_element(
                        name = 'GeneralLedgerEntries'
                        parent = l_element_AuditFile  ).
    Create element 'SourceDocuments' as child of 'AuditFile'
            l_element_SourceDocuments  = l_document->create_simple_element(
                        name = 'SourceDocuments'
                        parent = l_element_AuditFile  ).
    and with the this code obtain:
    <xs:element name="AuditFile">
    <xs:complexType>
    <xs:sequence>
      <xs:element ref="Header" />
      <xs:element ref="MasterFiles" />
      <xs:element ref="GeneralLedgerEntries" />
      <xs:element ref="SourceDocuments" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    Can you help me, please?
    Cordial greetings.

  • Unable to import xml into my CS4 project

    Hi folks,
    I am trying to embed a 3rd party flash component into my current flash project.  As a stand alone, the component works fine but when I try and import the xml file for the component into my current flash project library, the message I get:
    " one or more files were not imported because there were problems reading them"!!!
    I have tried importing the xml file into another dummy cs4 project on another machine and again no success, so I believe there are elements within the xml file that will not work with cs4.  Below is the xml file code.  I would appreciate if anyone can spot anything wrong with this file as to why it wont import into flash.  Even try and import it yourself and see what I mean.
    Hope someone can help.
    Regards
    Volterony22
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    There are 9 positions available :
    1. TL: top-left
    2. TC: top-center
    3. TR: top-right
    4. ML: middle-left
    5. MC: middle-center
    6. MR: middle-right
    7. BL: bottom-left
    8. BC: bottom-center
    9. BR: bottom-right
    If you set randomizePositions to true, it will overwrite the values you pass for each item
    startZoom: the zoom value to start with
    endZoon: the zoom value to end with
    transitionTime: the time for the slide to reach from property A to property B
    slideShowTime: the time the slide stays on screen
    disablePauseButton: it needs to be set to true if you want to have links on the slideshow
    -->
    <!--
    NOTE: The transition time must be higher than the slideshow time for each item! (make sure the difference is at least alphaTime value)
      The reason is so the zoom effect doesn't end before the transition does.
    -->
    <kenburns width = "1000" height = "348"
    backgroundColor = "0x000000"
    backgroundTransparency = "0"
    startWith = "1"
    randomSlideshow = "true"
    loop = "true"
    randomizeImagePosition = "false"
    alphaTime = "2"
    textX = "10"
    textY = "10"
    overColor = "0x000000"
    overAlpha = "20"
    disablePauseButton = "true">
    <!--
    <item>
    <title><![CDATA[<font size="16" color="#ffffff">Sand beach in the morning</font>]]></title>
    <path>content/images/image1.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>12</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>80</startZoom>
    <endZoom>100</endZoom>
    <startPosition>MC</startPosition>
    <endPosition>MC</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image2.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>25</transitionTime>
    <slideShowTime>22</slideShowTime>
    <startZoom>100</startZoom>
    <endZoom>55</endZoom>
    <startPosition>MC</startPosition>
    <endPosition>MC</endPosition>
    </item>
    <item>
    <title><![CDATA[<font size="18" color="#ffffff">Waves and wind</font>]]></title>
    <path>content/images/image3.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>27</transitionTime>
    <slideShowTime>20</slideShowTime>
    <startZoom>70</startZoom>
    <endZoom>100</endZoom>
    <startPosition>TC</startPosition>
    <endPosition>BC</endPosition>
    </item>
    <item>
    <title><![CDATA[<font size="18" color="#224F91">No words needed..</font>]]></title>
    <path>content/images/image4.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>12</transitionTime>
    <slideShowTime>9</slideShowTime>
    <startZoom>80</startZoom>
    <endZoom>80</endZoom>
    <startPosition>BL</startPosition>
    <endPosition>TR</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image5.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>35</transitionTime>
    <slideShowTime>32</slideShowTime>
    <startZoom>55</startZoom>
    <endZoom>100</endZoom>
    <startPosition>BC</startPosition>
    <endPosition>TC</endPosition>
    </item>
    -->
    <item>
    <title></title>
    <path>content/images/image6.jpg</path>
    <link>http://www.flabell.com</link>
    <target>_blank</target>
    <transitionTime>10</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>40</startZoom>
    <endZoom>35</endZoom>
    <startPosition>ML</startPosition>
    <endPosition>MR</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image7.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>20</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>70</startZoom>
    <endZoom>55</endZoom>
    <startPosition>MR</startPosition>
    <endPosition>ML</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image3.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>20</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>50</startZoom>
    <endZoom>60</endZoom>
    <startPosition>ML</startPosition>
    <endPosition>MR</endPosition>
    </item>
    </kenburns>

    Hi there,
    Thank you for responding.  When I say component, I have purchased a flash component from a company called www.flabell.com.  When you buy the component, you get the as, swf, assest, images, fla etc etc. 
    My goal is to embed this component into a flash project that I am working on at the moment which involves importing the assets/resources from the flabell component folder into the library of my current flash project.
    My folder structure at the moment is that I have top level folder call project.  In this folder is my actual flash project folder and the flabell component folder.  So no the html that embeds my main swf is not in the same folder as my 3 party swf - they are in two different locations.  However should this be an issue if I am importing the xml into my main project library anyway?
    Hope this info shines more light.
    Regards
    volterony22

  • Can't Figure Out How To Import XML into a Table?

    HELP!
    I've been using InDesign for several years now... but everything Ive ever done has been basic one off layout concepts.
    I am working on a website for a musical theater actress and for her resume, Id like to make a PDF which lists in table format the show, theatre and role she had for each job.
    I could do this manually... but Id really like to learn how to just reuse the same XML data that I have for her website and import it into InDesign.
    I have looked at Adobe's help file, I have scoured the internet, and I still can't figure it out... I have done like the adobe support file says... and I cant seem to get the values I create in her resume xml file to show up in a table I create in InDesign.
    I even tried to simplify it for the learning process and did something as basic as an XML file that has 5 colors... couldnt even get that working.
    So could someone explain it to me like Im a 5 year old... how to take a XML file, import it, place it in a table and have the data actually show up in the table.
    thanks,
    brian

    Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
    In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
    If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
    http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
    It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
    Jeremy

  • XML into one field

    Hi , we have a scenario where we have to move entire source structure into one of the fields of the target structure.
    Example:
    Source:
    item1
    description
    store
    storedescription
    price
    batch
    Target:
    item1
    store
    xmlstring
    we would like to do following mappings:
    1. item1 in source to item1 in target
    2. store in source to store in target
    3. entire source structure in XML format into xmlstring in target
    we reffered following blog , but couldnt map to our requirement.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    XML to single element: Attn: Henrique
    Thanks,
    Rajesh

    HI
    I think you need to write UDF for this. there is library from apache called XML Serializer. Below is the sample file how you achieve that using that. Use that code in your UDF.
    http://www.informit.com/articles/article.asp?p=31349&seqNum=3&rl=1
    Even just concatenate into one field in the target during mapping and the send the data . this could also achive your requirments. no need to go for Java mapping
    thanks
    Swarup
    Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM
    Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM

  • How to format a not well formed xml into well formed

    Hi,
    Here's what I'm trying to do: I have a build a report based on query results. In the query result, one field is a CLOB (which contains XML. The XML contains two tags - "description" and "count"). I want to read (&parse) the XML and store the "description" and "count" in a hashmap. But when I try to parse it, I end up in an error. I'm currently  using XmlParse but I got an error "The markup following the root element should be well formed."  I immediately used IsXml() to find out if the XML I am reading is well formed.  And the answer is "NO".
    Could someone help me in converting it into a "well formed" one?
    (This is what I've tried: I appended "<?xml version="1.0" encoding="UTF-8"?>" to the XML I'm reading coz it was missing this.  I later used XmlFormat to convert the XML into a string format.  But IsXML tells me that even this is not well formed.)
    Thanks much for your help!

    XML encodes information is a specific way. Well-formedness determines whether or not a string is an XML document in the first place.
    However, as well-formedness can be broken by any arbitrary number of factors, it is in general impossible to automate the repair process to recover a well-formed XML document. You have to do it manually, using an XML or a text editor.

  • How to get multiple elements into one element as multiple occurences

    I can't figure out how to do this. I have an input message that has multiple elements and I need to take those elements and copy them into one element with each new element going in as a new occurence or instance. For example
    I have this input under one parent node.
    element1
    element2
    element3
    element4
    and this is the output I need
    Node
    Element1[0]
    Element2[1]
    Element3[2]
    Element4[3]
    The input XML looks like this
    Payload
    Element1
    Element2
    Element3
    and the output XML needs to look like this
    Payload
    Element.
    Thanks in advance

    How about this.
    Input XML:
    <Row>
              <Column1>TOTAL</Column1>
              <Column_9_2_2008>900</Column_9_2_2008>
              <Column_9_2_20082>890</Column_9_2_20082>
              <Column_9_3_2008>52</Column_9_3_2008>
              <Column_9_4_2008>0</Column_9_4_2008>
              <Column_9_4_20082>0</Column_9_4_20082>
              <Column_9_5_2008>0</Column_9_5_2008>
              <Column_9_5_20082>0</Column_9_5_20082>
              <Column_9_8_2008>0</Column_9_8_2008>
              <Column_9_8_20082>0</Column_9_8_20082>
              <Column_9_9_2008>0</Column_9_9_2008>
              <Column_9_9_20082>0</Column_9_9_20082>
              <Column_9_10_2008>0</Column_9_10_2008>
              <Column_9_10_20082>0</Column_9_10_20082>
              <Column_9_11_2008>0</Column_9_11_2008>
              <Column_9_11_20082>0</Column_9_11_20082>
              <Column_9_12_2008>0</Column_9_12_2008>
              <Column_9_12_20082>0</Column_9_12_20082>
              <Column_9_15_2008>0</Column_9_15_2008>
              <Column_9_15_20082>0</Column_9_15_20082>
              <Column_9_16_2008>0</Column_9_16_2008>
              <Column_9_16_20082>0</Column_9_16_20082>
              <Column_9_17_2008>0</Column_9_17_2008>
              <Column_9_17_20082>0</Column_9_17_20082>
              <Column_9_18_2008>0</Column_9_18_2008>
              <Column_9_18_20082>0</Column_9_18_20082>
              <Column_9_19_2008>0</Column_9_19_2008>
              <Column_9_19_20082>0</Column_9_19_20082>
              <Column_9_22_2008>0</Column_9_22_2008>
              <Column_9_22_20082>0</Column_9_22_20082>
              <Column_9_23_2008>0</Column_9_23_2008>
              <Column_9_23_20082>0</Column_9_23_20082>
              <Column_9_24_2008>0</Column_9_24_2008>
              <Column_9_24_20082>0</Column_9_24_20082>
              <Column_9_25_2008>0</Column_9_25_2008>
              <Column_9_25_20082>0</Column_9_25_20082>
              <Column_9_26_2008>0</Column_9_26_2008>
              <Column_9_26_20082>0</Column_9_26_20082>
              <Column_9_29_2008>0</Column_9_29_2008>
              <Column_9_29_20082>0</Column_9_29_20082>
              <Column_9_30_2008>0</Column_9_30_2008>
         </Row>
    Output XML:
    <Total>
              <Payload>900</Payload>
         </Total>
         <Total>
                   <Payload>890</Payload>
         </Total>
         <Total>
                   <Payload>52</Payload>
         </Total>

  • Issue importing a file into photoshop elements 11

    I am new to Photoshop Elements 11. I am just playing around with it right now to get used to it since I've never worked with the program before. I am importing files from iphoto and it is working fine except for one thing. I imported a group of photos and while I was playing around in Elements (basically to get used to naming folders/albums/moving things around/etc) I deleted the folder I had imported, more or less to see what happens, and now when I try to import the same file into Elements again, it tells me that "the file selected to import did not contain supported file types or the files are already in this catalog." I cannot find these pictures anywhere within my catalog, so why will it not let me import them a second time? I have looked all over online for an answer to this and have come up empty handed. If someone knows how I can get this group of pictures into Elements, please let me know! I'd like to start practicing with the editing options but need these pictures in the program first. (I did also create an album from the file I imported, again to practice moving things around within Elements, and when I deleted the Folder the Album went away too.) I am still able to import other files from iphoto, it is just that this one particular file will not transfer....is it because I deleted it and now it somehow does not recognize the file??

    Welcome to the forum.
    As you have reposted to the Photoshop Elements Forum, where you will get quick and expert help, I will Lock this thread, and all discussion can take place in the Ps Elements Forum.
    Good luck,
    Hunt
    [Thread Locked]

  • ABAP to XML Transformation Dynamic Element Generation

    Hi all,
    I have created a deep structure and used simple transformation in XSLT Tool to create XML file. But I would like to generate some elements dynamically. Desired XML output is in the attachments.
    There is a way to do that if had used XSLT Program instead of simple transformation (dynamic xml nodes using xslt - Stack Overflow) but XSLT Program does not create fields from structures automatically like simple transformation.
    So, is there any way to do that using simple transformation ?
    Thanks.

    The error is related to your web browser software or release, because it can't support utf-16 xml file (for example, IE 6 doesn't support it).
    Your output file contains <?xml version="1.0" encoding="utf-16"?> in your ECC 6 system because your SAP system is Unicode, and you used a variable of character type behind RESULT XML. When it's character, SAP converts the XML into SAP code page. If you use a byte type behind RESULT XML, SAP doesn't convert, and you'll get the XML data in the encoding of the transformation (defined here: <xsl:output encoding="ISO-8859-1" ...).
    I guess you have choosen ISO-8859-1 because your 4.7 system issued a file with that encoding.
    So, the only thing you have to do, in the call transformation statement, is to store the result into a table of X255 (instead of table of CHAR2048).
    Edited by: Sandra Rossi on Jul 6, 2010 4:14 PM CET:
    You must also download using filetype = 'BIN'

  • Scripting Selective XML into a Single Text Frame? (& Some Other Stuff...)

    Hi all, I could use some help (using version CS5.5).
    I want to import (via Javascript) an XML file similar to this:
    <movieRoot>
         <dvds>
              <movie>
                   <title>2001: A Space Odyssey</title>
                   <edition>Special Edition</edition>
                   <features>NOTHING</features>
                   <notes/>
              </movie>
              <movie>
                   <title>Airplane!</title>
                   <edition />
                   <features>Extra Laughs</features>
                   <notes/>
              </movie>
         </dvds>
    </movieRoot>
    I've been able to successfully do this, so no problem there.
    Then I want to dump the child elements under the XML element "<dvds>" into a single text frame that spans 2 columns per page. That's easy enough too, except:
    1) I want to filter the data so that empty elements or whose contents equal "NOTHING" do not appear.
    2) I want to add static text title above some of the elements that remain (outside the XML proper).
    3) Then I want to format the text (using Paragraph Styles).
    Tall order, I know, but I'm keen on figuring it out. I initially created a document using placeholders and used the standard XML Import to populate it with data, which was filtered using scripts to remove extraneous placeholders and static text. It gave me the result I wanted, but as the XML will be regularly updated and since the "filtered" tags result in non-standard XML entries, it means starting over from scratch after every XML update. So I turned to scripting...
    For point #1, I was able to filter properly using a recursive IF statement, tested here using message alerts:
    I've included a bunch of variables for (hopefully) easier viewing.
    var myXMLRoot = myDocument.xmlElements.item(0);  //movieRoot
    var myXMLParent = myXMLRoot.xmlElements.item(0);  //dvds
    var myXMLElement = myXMLParent.xmlElements.item(0);  //movie
    var currElement = myXMLElement.xmlElements.item(0);  //title
    for (i = 0; i < myXMLParent.xmlElements.length; i++)
        myXMLElement = myXMLParent.xmlElements.item(i);
        for (j = 0; j < myXMLElement.xmlElements.length; j++)
            currElement = myXMLElement.xmlElements.item(j);
            if (currElement.contents != "" && currElement.contents != "NOTHING")
                alert (currElement.markupTag.name + ": " + currElement.contents);
    It worked great until I tried to get it into an existing text frame. Since I want all the info in one text frame, placexml was out of the question, and markup worked but overwrote XML tags -- such as assigning the entire text frame to <movie/title> when I wanted it assigned to <dvds> with <movie/title> tags nested within it.
    If you can help me with anything, this is really where I need pointed in the right direction most. But if you're feeling generous or bored...
    Then for points #2 and #3, I want to take what's left ("filtered" XML data) and add additional text and formatting wherever certain tags are found.
    For example, applying the paragraph style "MovieTitles" for any text within <title></title> XML tags; or adding the phrase "Special Features" (with paragraph style "Headers") above any text marked with <features> tags, while the content within those <features> tags applies the paragraph style "NormalText."
    I've got some of this worked out in pieces already, but it generally falls apart because I can't get the tag structure correct in the text frame. I can provide more info as requested. Any help would be mighty appreciated!
    UPDATE: Surprisingly, I've actually had some good success this evening on solving most of these problems. I'll post my results once I've finished up just in case anyone else can be helped by what I've learned.
    One question remains for the moment: I've inserted text within an XML element, but outside of XML tags (e.g., </title>EDITION:<edition>) using "insertTextAsContent":
    [xmlElementHere].insertTextAsContent("EDITION:", XMLElementPosition.beforeElement); 
    Does anyone know a good way to apply a paragraph style to that text without using a find & replace function later (after placing the XML into a text frame)?

    As posted into the other thread:
    Yes, each record will be in its own frame.
    You can use one of a couple solutions to stitch (link) each frame to the other, delete all but the first page and the first merged record, then resize that first merge frame and reflow the entire document.
    https://forums.adobe.com/thread/1341730?start=0&tstart=0
    Please review this thread. There is a couple posts with a script and you would want the last version of that script. You would have to follow the directions, as well as add a column at the beginning of your data and fill it with consecutive numbers.
    Alternatively, there is a free plug-in by Rohiko for stitching merge data frames together, then follow the process above to reflow the document.
    https://www.rorohiko.com/wordpress/indesign-downloads/textstitch/
    Mike

  • Drag and drop Picasa Album Into Premiere Elements 10

    I tried to drag and drop videos from an album I made in Picasa into Premiere Elements.  No dice.  I tried to drag and drop files from windows explorer into Elements.  No dice.  I have 200 files from various folders all over my machine, assembled in a Picasa album, and I have no way of importing those files into Elements from what I can see.  Anyone know how I can do this?
    I even tried to be clever, grabbing the Picasa XML file that contains the full paths of each file and then creating a space delimited list (with Quotes around each path) and pasting it into the OPEN FILE dialog.  But there seems to be a maximum string length.  No dice.
    Your help would be appreciated.  Thank you in advance.
    Keith

    Yes, the PREL (Project) file is XML, however it is structured for PrE to be able to read (and write) it. If PrE can read the Picasa XML (the structure makes sense to the program), then it just might work.
    Unfortunately, I have never used Picasa, so have no idea of its Album files structures. I also cannot recall anyone mentioning working with it, and PrE, but maybe missed that/those thread(s).
    Other than the general observation, offered above, I have no useful knowledge on what might, or might not work. However, as you experiment, please update this thread, as it might prove very helpful to others - and I get to learn something!!!!
    Good luck,
    Hunt

  • BPEL process to Insert XML into DB using pl/sql stored proc

    Hi,
    We have created a BPEL process in which we are taking input request and store it into Oracle Database using PL/SQL proc.
    We have been unsuccessful in doing so because the data stored in table has root element missing.
    Has any body done this (insert xml into DB using pl/sql stored proc) successfully ?
    We can so this successfully if we do not use stored procedure and store data directly in table.
    Regards

    I have done this, stored it as a CLOB.
    Also I received the payload as an opaque schema, so I had to convert the message from binary into string.
    This way the root element doesn't get removed.
    cheers
    James

Maybe you are looking for

  • Time capsule can't recognize my airport express

    My system 10.5.4 was working fine until my modem died. I replaced the modem and then got my time capsule up and running. When I try to add my airport express (which I use to play music on my stereo) in airport utility I am able to find it only if I d

  • Tecra M3 PTM30A: BSOD while booting - How to reinstall the Win XP?

    Hey Ive got a Toshiba Tecra M3 model number PTM30A-029002 and iv recently experienced a problem which I think a virus did. When I start computer normally it goes to XP loading screen then goes to a blue screen saying stop: c000021a (Fatal System Erro

  • Tax Calculator

    Hi, I'm new & working on my assignment. I'm working on a tax calculator applet. I'm having problems (cannot work) and would like to ask if anyone can correct my mistakes. Here's my code import java.applet.*; import java.awt.*; import java.awt.event.*

  • Get size of the mailbox before/after backup

    Hi there i've been assigned to do a specific report related to exchange and its backup  so what we want is a report that would give us the global size of all our databases before and after the backup ( even the size of the logs before and after) (exa

  • Captured video not in Browser

    I have been capturing video on my home iMac with no problem. I'm capturing directly into a Lacie d2 quadra 500GB. FNC shows I still have 115 BG available. But now the title of latest video I captured shows up in the Browser but there's no video. The