Adding together imported xml variables?

Hello world

I still have another problem that I can't solve

I imported some info an xml file in my film. The news of this file are then displayed in the dynamic text boxes. Three of these text boxes display a price that displays fine. However, I need the contents of these text boxes to be added in another area of dynamic text called total. I need this amount to update the change of price fields. I just can't understand it.

Here is my code which is placed in part 1 of my movie:

The last line of code in the sense of how I think it should work, but I think that its probably totally wrong

Stop();

bar._visible = false;

bar2._visible = false;

bar3._visible = false;

please_wait._visible = false;

Fill the basket with the default items in the xml file.

function CreateMenu (cart_xml) {}

/ / start with the first element in the XML file

var items = cart_xml.firstChild.firstChild.childNodes; Menu-> menuitems-> child nodes table

for (var i = 0; i < items.length; i ++) {}

/ / continue only if the type of this element is a squirrel

if (items [i].attributes.type == 'money') {}

/ / create variables for our items

var componentlegs = items [i] .firstChild; identical to points [i] Sublst.ChildNodes(1).ChildNodes(0) [0]

var colourlegs = items [i] Sublst.ChildNodes(1).ChildNodes(0) [1]; second child node

var pricelegs = items [i] Sublst.ChildNodes(1).ChildNodes(0) [2]; second child node

var componentbody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [3];

var colourbody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [4];

var pricebody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [5];

var componentbezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [6];

var colourbezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [7];

var pricebezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [8];

/ / assign the text using nodeValue for text

legs_component.text = componentlegs.firstChild.nodeValue;

legs_colour.text = colourlegs.firstChild.nodeValue;

legs_price.text = pricelegs.firstChild.nodeValue;

body_component.text = componentbody.firstChild.nodeValue;

body_colour.text = colourbody.firstChild.nodeValue;

body_price.text = pricebody.firstChild.nodeValue;

bezel_component.text = componentbezel.firstChild.nodeValue;

bezel_colour.text = colourbezel.firstChild.nodeValue;

bezel_price.text = pricebezel.firstChild.nodeValue;

}

}

}

manage XML

create the new instance of the XML object, not forgetting to ignore white space

var cart_xml = new XML();

cart_xml.ignoreWhite = true;

define an onLoad to create our menu location when the XML has been loaded correctly.

cart_xml. OnLoad = {function (success)}

if (success) CreateMenu (this);

of other trace ("error loading XML file"); without success?  spot an error (won't be visible on the web)

}

load the xml file!

cart_xml. Load ("Cart.xml");

total = (Number (pricelegs)) + ((pricebody) Number) + (Number (pricebezel));

Thanks in advance for any response to my dilemma!

See you soon

Matt

Try:

Stop();

bar._visible = false;

bar2._visible = false;

bar3._visible = false;

please_wait._visible = false;

Fill the basket with the default items in the xml file.

function CreateMenu (cart_xml) {}

start with the first element in the XML file

var items = cart_xml.firstChild.firstChild.childNodes; menu-> menuitems-> child nodes table

for (var i = 0; i)

continue only if this element type is a squirrel

If (. attributes.type items [i] == 'money') {}

create variables for our items

var componentlegs is items [i] .firstChild;. identical to points [i] Sublst.ChildNodes(1).ChildNodes(0) [0]

var colourlegs = items [i] Sublst.ChildNodes(1).ChildNodes(0) [1]; second child node

var pricelegs = items [i] Sublst.ChildNodes(1).ChildNodes(0) [2]; second child node

var componentbody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [3];

var colourbody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [4];

var pricebody = items [i] Sublst.ChildNodes(1).ChildNodes(0) [5];

var componentbezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [6];

var colourbezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [7];

var pricebezel = items [i] Sublst.ChildNodes(1).ChildNodes(0) [8];

assign the text using nodeValue for text

legs_component. Text = componentlegs.firstChild.nodeValue;

legs_colour. Text = colourlegs.firstChild.nodeValue;

legs_price. Text = pricelegs.firstChild.nodeValue;

body_component. Text = componentbody.firstChild.nodeValue;

body_colour. Text = colourbody.firstChild.nodeValue;

body_price. Text = pricebody.firstChild.nodeValue;

bezel_component. Text = componentbezel.firstChild.nodeValue;

bezel_colour. Text = colourbezel.firstChild.nodeValue;

bezel_price. Text = pricebezel.firstChild.nodeValue;

total = (Number (pricelegs.firstChild.nodeValue)) + ((pricebody.firstChild.nodeValue) Number) + (Number (pricebezel.firstChild.nodeValue));

}

}

}

manage XML

create the new instance of the XML object, not forgetting to ignore white space

var cart_xml = new XML();

cart_xml.ignoreWhite = true;

define an onLoad to create our menu location when the XML has been loaded correctly.

cart_xml. OnLoad = {function (success)}

If (success) CreateMenu (this);

Another trace ("error loading XML file"); without success?  spot an error (won't be visible on the web)

}

load the xml file!

cart_xml. Load ("Cart.xml");

Tags: Adobe Animate

Similar Questions

  • Import XML stored variable in as3?

    Hey guys

    Basically, my current project has lots of global variables, for example

    Globals.Data.var1
    Globals.Data.var2

    etc.

    What I do is the value of each variable in my XML file, then pass the value to the global var in my project

    so in the XML file xmlvar1 could have a value of 8.

    Then in my project, I want to:

    Globals.Data.var1 = the value of xmlvar1 (in other words, 8)

    so a) is there a simpler way to do this that way I adapted code Adama and (b) if not, why the code does not work (I'll paste the code below).

    Basically, I can read the XML variable in my as3 code, but after all the functions of importing XML, when I said to trace (globals.data.eTP); -It returns undefined.  However, if I said t
    race (globals.data.eTP); immediately after the line of code that matters, he returned 8 Then it is like the rest of my as3 code attempts to deal with the variable before it entered my XML file:
     
    var myXML:XML = new XML();
    var XML_URL:String = "edit.xml";
    var myXMLURL:URLRequest = new URLRequest (XML_URL);
    var myLoader:URLLoader = new URLLoader (myXMLURL);
    myLoader.addEventListener ("complete", xmlLoaded);

    Create the function of xmlLoaded
    function xmlLoaded(event:Event):void {}

    Place xml data into the object myXML
    myXML = XML (myLoader.data);
    Initialize and to give the name of var XMLDocument new external
    var xmlDoc:XMLDocument = new XMLDocument();
    Ignore the spacing around the nodes
    xmlDoc.ignoreWhite = true;
    Define a new name for the loaded XML file that matches the data in myLoader
    var menuXML:XML = XML (myLoader.data);
    Analyze XML data in a readable format
    xmlDoc.parseXML (menuXML.toXMLString ());

    Run "for each" loop to go through all the menu items listed in the external XML file
    for each (var T:XML in myXML... (T) {}

    Access the value of the "T" node in our external XML file
    globals.data.eTP = T.placeMe.toString ();

    } //end of loop foreach

    } / / end of xmlLoaded function

    trace (Globals.Data.eTP);

    Any ideas what's happening?  Also, is there a different syntax in the
    globals.data.eTP = T.placeMe.toString (); code to bring in numbers instead of text?

    Thanks for your help guys.

    Shaun

    I guess that globals is a class that has a static object, data and you have imported globals in the scope that contains your code.

    If this isn't true, you have more problems than the two below:

    1. your loop is repeatedly attributing values to the property of the object, globals.data.eTP

    2. you are running to the trace() function before your function xmlLoaded(), as mentioned in one of your other threads.

  • Trying to import XML into PDF subform

    I have a very big form where the first page is pre-filled with data in livecycle service, but then users want to import an xml file to populate the data in the rest of the form.  If I use the xfa.host.importData () it is the xml but overwrites all pre-populated data.  If there is a default value that is specified for a field, it it resets the default value.

    Is there a way to control which part of the form is updated by the import?  Or is there a way to protect the pre-filled data so that it is not replaced?  I tried to set readOnly, non-interactive, protected areas, etc., but it seems not to matter.  I also thought trying to dynamically set the defaultValue properties, but this does not seem to be supported.

    I looked the loadXML method as well, but don't know how to implement - or if it's even feasible option with this use case.

    I don't know that it can be accomplished if write us a script to parse the XML manually in each field, but there are several hundred fields so I hope that there is a better way... Any suggestions?

    Thank you!

    I remember a client asks me something like that once but being too busy and give it a low priority, I decided to shelf it.

    Now that I'm not busy, I'm happy I came across your question and took a few hours to concoct it. Here's how the script works:

    (1) the form saves the current xml of the form all data in a global variable

    (2) it then prompts the user for the xml file to import into the form. Replace all data in the form

    (3) form saves the xml data for just the subform to which the newly imported data applies to in another variable

    (4) charging the xml saved from the first variable just before importation took place

    (5) then uses the second variable with the data in the subform and crushes the subform

    The following code is also a few assumptions:

    (1) your form is bound to a schema

    (2) subforms can be used as a parameter to the mergeData function no fields

    (3) the used subform must itself be bound to a data node. Not only the areas that it contains.

    Put this button even your "import":

    //Save the current state of the form in a global Acrobat variable
    global.formXML = sanitizeData(xfa.datasets.data.saveXML('pretty'));
    //Show the import XML dialog
    xfa.host.importData();
    //Removes the xml header
    function sanitizeData(xfaData) {
     xfaData = xfaData.replace(/<\?xml\sversion="1.0"\sencoding="UTF-8"\?>/,"");
        return xfaData;
    }
    

    Because the form asking for a time to merge the data before execution is continued, the following must stay in the case of the form: ready:

    if (typeof(global.formXML)!='undefined')
     mergeData(YourSubformHere);//Enter the SOM expression of the subform you want to import
    function mergeData(oSubform){
     //Save the subforms data
     var subformXML = sanitizeData(xfa.datasets.data.resolveNode(oSubform.dataNode.somExpression).saveXML('pretty'));
     //reload the entire forms data from the xml import in the click event
     xfa.datasets.data.loadXML(global.formXML,1,1);
     //global variable no longer needed
     delete global.formXML;
     //Load the new subform data stored in variable subformXML
     xfa.datasets.data.resolveNode(oSubform.dataNode.somExpression).loadXML(subformXML,1,1);
     xfa.form.remerge();
    }
    //Removes the xml header
    function sanitizeData(xfaData) {
     xfaData = xfaData.replace(/<\?xml\sversion="1.0"\sencoding="UTF-8"\?>/,"");
        return xfaData;
    }
    

    A lot of things to take, but I hope it solves your problem.

    Let me know.

    Kyle

  • Import xml with attributes how to apply the pagination, property

    I have xml files in which paging is set using an attribute. The value of this attribute must be read and applied to the paragraph format in FrameMaker when importing xml files. I guess it must be educated according to the rules of reading writing. But how?

    Arnor,

    To control the format paragraph with an attribute, apply format rules in ESD rather than read/write rules. You cannot copy a value to attribute to a property value, but can test specific attribute values and set a property accordingly. For example, if you have a widow named attribute and know sure that value never exceeds 10, laboriously have a rule such as:

    1. If the context is: [widow = "1"]

    Paging properties

    Widows and orphans lines: 1

    Otherwise, if the context is [widow = '2']

    Paging properties

    Widows and orphans lines: 2

    ...

    Otherwise, if the context is [widow = "10"]

    Paging properties

    Widows and orphans lines: 10

    For other paragraph pagination properties, your ESD must also test values, for example:

    2. If the context is [Placement = 'RunIn']

    Paging properties

    Placement: Top of break-in

    By default the punctuation:

    Otherwise, if [Placement = 'Coast']

    Placement: Head to one side

    Of course, attribute names may be different from the names of properties of FrameMaker or value keywords.

    -Lynne

  • Problem with InDesign startup script does not import XML images

    I'm doing an XML import automatically from a startup script when a document is loaded. I managed to get most of the content to fill, but the images are ignored. Everything works, including images, when I do a manual 'Import XML' through the user interface or a manual script.

    Here's my manual script:

    var myDocument = app.activeDocument;
    var xmlFile = File('/c/Full/Path/To/data.xml');
    
    myDocument.importXML(xmlFile);

    But the goal is to do at startup. Here's my startup script:

    #targetengine "session"
    
    app.addEventListener('afterOpen', function(myEvent) {
       if (myEvent.target.constructor.name !== 'Document') {
       return;
       }
    
       var myDocument = myEvent.target;
       var xmlFile = File('/c/Full/Path/To/data.xml');
    
      myDocument.importXML(xmlFile);
    });

    Here is the XML tag for the image:

    <Image href="file:///C:/Full/Path/To/Image/02.png" />

    I wonder there is a problem with the 'afterOpen' event reminder, and it is the reason why it works manually using the same method, but not in the startup script.

    I solved it by avoiding the event quite listener:

    main();
    
    function main () {
    
        // create a path for a file object
        var curFile = File('/c/Path/To/file.indd);
        var xmlFile = File('/c/Path/To/data.xml');
    
        // close app if files don't exist
        if (!curFile.exists || !xmlFile.exists) {
            app.quit(SaveOptions.NO);
        }
    
        // open the file
        var curDoc = app.open(curFile);
    
        // import the xml
        curDoc.importXML(xmlFile);
    
        // create a new file object
        var pdfFile = new File(curFile.parent + '/' + curFile.name + '.pdf');
    
        // export to pdf
        curDoc.exportFile(ExportFormat.PDF_TYPE, pdfFile);
    
        // close app
        app.quit(SaveOptions.NO);
    
    }
    
  • problem with import XML CALS table

    HII all

    After you import this xml file, any of the styles are getting applied. What is the problem can anyone please suggest me?

    How can I keep the formatting of the array of client access licenses?

    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >

    " < root xmlns:aid =" http://ns.Adobe.com/AdobeInDesign/4.0/ "xmlns:aid5 =" " http://ns.Adobe.com/AdobeInDesign/5.0/ ">

    " < table reference to the line xmlns:aid5 = ' http://ns.Adobe.com/AdobeInDesign/5.0/ "aid5:tablestyle ="Table Style 1"id ="data-uuid-85c64ce474f44dd29d9a3fa865f904cc"class =" fonts color5 table-b-without personal-tbl-1 "> < legend > < div id ="data-uuid-4298179eea2d4f2d82a32c67b4c9fa0e"class ="enumeration"> table 14.1 < / div > < id p ="data-uuid-d0268f391343450cbab368b1831ff025"class ="caption text-upper case"" > isolating mechanisms < /p > < / legend > < table xmlns:aid = " " http://ns.Adobe.com/AdobeInDesign/4.0/ "xmlns:aid5 =" " http://ns.Adobe.com/AdobeInDesign/5.0/ ' > < tgroup cols = "3" > < colspec colname = "col1" align = "left" / > < colspec colname = "col2" align = "left" / > < colspec colname = "col3" align = "left" / > < tbody > .

    < class rank = "sans-bordure" aid5:cellstyle = "Cell Style 1" > < input id = "data-uuid-ede057eb285543d8a4cbc4d3b565d7ff" colspan = "2" = "col1", "col2" = nameend namest > mechanism < / entry > < input aid5:cellstyle = 'Cell Style 1' id = "data-uuid-e016edb506ee49aea209f19478f4d824" > Description < / entry > < / row >

    < row > < entry class = 'coinciding stripe_light' aid5:cellstyle = 'Cell Style 1' id = "data-uuid-506493f60a084106ae6296aff9216574" colspan = "3" = "col1" = "col3" nameend namest > < b aid: cstyle = "Bold" > < i > pre-Zygotic isolating mechanisms < /i > < / b > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-8145412fdb39438095a7197ada7f2115' > < id p 'data-uuid-70e60bc9ad3a4ac291fb620caf081d1d' = > geographic isolation < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-9ed825cf49c04082a20168440f46201a"class ="top-align"> < img src =".. /.. "/ img/chapter14/joh24218_ta1419a.png" id = "data-uuid-e6a1f66608b04b26b14692423a7e359f" class = "icon" alt = "" / > < / entry > < entry aid5:cellstyle = "cell Style 1" id = 'data-uuid-0f7976f59c5049b9bacc944ad602e341' > < id p 'data-uuid-0e5db85451dd4885a23c605db00311c5' = > species meet in different areas, which are often separated by a physical barrier such as a river or a mountain. "." < /p > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-f5f1fc6665c849a6beebebc2dcca0451' > < id p 'data-uuid-2af394a0735e40d9ab4443e73def9cd1' = > ecological isolation < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-fcb4f22194854f2fbde9f015ab979afc"class ="top-align"> < img src =".. /.. «/ img/chapter14/joh24218_ta1419b.png "id ="data-uuid-67b213f9d25a4aa9b6c485a29f7adbc5"class ="icon"alt =" "/ > < / entry > < entry aid5:cellstyle =" cell Style 1 "id = 'data-uuid-026ecfe721b3486b8297cb8488a61aa1' > < id p ="data-uuid-ec1a4beee213488db3355a6533414bbd"> species are found in the same area, but they occupy different habitats."» Survival of the hybrids is low because they are not suited to every environment of their parents. < /p > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-42178dda8c6a439cb1be19973c9b4aff' > < id p 'data-uuid-1a5d7da421694a03b0be2a377675b365' = > temporal isolation < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-8eff236da2844032bb69976f45b64ae1"class ="top-align"> < img src =".. /.. «/ img/chapter14/joh24218_ta1419c.png "id ="data-uuid-e6a36506d48a47bd9534fc4781a94432"class ="icon"alt =" "/ > < / entry > < entry aid5:cellstyle =" cell Style 1 "id = 'data-uuid-5bd683b850434384bb97c205230977fc' > < id p = 'data-uuid-ccff8d5b8bbd46e9a5e70f3eb107dac6' > species breed throughout the seasons or at different times of the day."» < /p > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-bcb00d31536b42d58dbc1abeb721dd8d' > < id p 'data-uuid-8086b5add322409b91f267d79c7c74d9' = > behavioral isolation < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-0c5a2a11119a47aa96d47e956ba45f52"class ="top-align"> < img src =".. /.. «/ img/chapter14/joh24218_ta1419d.png "id ="data-uuid-c1c60e0a6ecc477389c3a96ccab64552"class ="icon"alt =" "/ > < / entry > < entry aid5:cellstyle =" cell Style 1 "id = 'data-uuid-54254e285d4e44299937d69b1868a1f1' > < id p ="data-uuid-e5274b4e29544b658fe7aaa6d39da9cb"> species differ in their mating rituals."» < /p > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-62aa183214524825a376afc55f5490c7' > < id p 'data-uuid-3a10962b672c4fa4b896e6bee387f3cd' = > mechanical insulation < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-5c977123e6214b1bb10373e47860bc96"class ="top-align"> < img src =".. /.. "/ img/chapter14/joh24218_ta1419e.png" id = "data-uuid-822bea6dd64d4badb5bca8cdd51343ec" class = "icon" alt = "" / > < / entry > < entry aid5:cellstyle = "cell Style 1" id = "data-uuid-3a48404d0ccf4231b05bacb311a0bfac" > < id p = "data-uuid-f5f1276a7f8341feb43d3d7d26c03f8a" > prevent the structural differences between the mating species. ". < /p > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-488c3da229c44bbcbd251f4a192e0c5c' > < id p 'data-uuid-e141a87c287148bc99e9bfb2879865fd' = > prevention from the fusion of gametes < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-b08134eaff11491cbdcd00b25adebc73"class ="top-align"> < img src =".. /.. "/ img/chapter14/joh24218_ta1419f.png" id = "data-uuid-e400f7983e7d4d2591fb84f56214034e" class = "icon" alt = "" / > < / entry > < entry aid5:cellstyle = "cell Style 1" id = 'data-uuid-0148f03041554bc880da2f1c994954b0' > < id p 'data-uuid-378da9e575e146348707abba6e4ea619' = > gamete of a species work poorly with the gametes of another species or within the genitalia of another species. ". < /p > < / entry > < / row >

    < class rank = 'coinciding stripe_light' > < input aid5:cellstyle = 'Cell Style 1' id = "data-uuid-d9873c4599f84de9ac19da0fc440b2a8" colspan = "3" = "col1" = "col3" nameend namest > < b aid: cstyle = "Bold" > < i > mechanisms of isolation postzygotique < /i > < / b > < / entry > < / row >

    "< class rank ="coinciding stripe_light"> < input aid5:cellstyle = 'Cell Style 1' id = 'data-uuid-d4aaddfcdd4c4c67b250d0a2cc9153d1' > < id p 'data-uuid-c6e23322167c4313bd6be5acf1de40a3' = > unsustainability of the hybrids or infertility < /p > < / entry > < entry aid5:cellstyle = 'Cell Style 1' id ="data-uuid-f3362efbf437435e99f1632b5c2b7d8e"class ="top-align"> < img src =".. /.. «/ img/chapter14/joh24218_ta1419g.png "id ="data-uuid-e1ab32a551494b97acceb87a68831f60"class ="icon"alt =" "/ > < / entry > < entry aid5:cellstyle =" cell Style 1 "id = 'data-uuid-bdcd5b643e6d42d59255fa3195ee6107' > < id p = 'data-uuid-f1fdfcd406a844bdb00f16de9a81b270' > hybrid embryos do not develop properly, hybrid adults do not survive in the wild, or hybrid adults are infertile or have reduced fertility."» < /p > < / entry > < / row > < / tbody > < / tgroup > < / table > < / purchase online table > < / root >

    You try to call attributes on a table of client access licenses. As a cal, Indesign tries to draw as a result to the specification of CLIENT access licenses. Do not know a thing about aid attributes: cellstyle.

    So if you want to use these styles in a tahnks tbal of importing xml, you must use a more user-friendly table InDesign XML syntax.

    More details here:

    http://carijansen.com/InDesign-XML-part-2/

    HTH

    Loïc

    http://www.ozalto.com/

  • Animate CC import &amp; xml

    I recently changed my CS4 to animate centuries previously, I imported xml data in to dynamic text fields using the following steps:

    var xmlData:XML = new XML();

    var theURL_ur:URLRequest = new URLRequest ("affiche.xml");

    var loader_ul:URLLoader = new URLLoader (theURL_ur);

    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void

    {

    xmlData = XML (loader_ul.data);

    CAM_txt. Text = xmlData.CAM;

    CAL_txt. Text = xmlData.CAL;

    CPM_txt. Text = xmlData.CPM;

    CPL_txt. Text = xmlData.CPL;

    DAM_txt. Text = xmlData.Double_AM;

    DAL_txt. Text = xmlData.Double_AM_limite;

    DPM_txt. Text = xmlData.Double_PM;

    DPL_txt. Text = xmlData.Double_PM_limite;

    }

    I created a HTML5 canvas using the same script and the web page does not appear anything (a blank page). Can I import xml into an HTML5 canvas? If Yes, can someone help me with the coding?

    Thank you

    Jody S

    found this on another forum from adobe:

    How can I load external XML content to my HTML5 doc?

  • Avoid duplicates when you import XMLs?

    There are a few versions, we have fixed the problem to get the duplicate items when you import new projects in another.  This was very helpful.

    However, I have noticed that when you import XMLs, first does not apply the same level of... discretion

    Is it possible to get XMLs for import without creating duplicate items?  I found a workaround by first import the XML file into a new project and then import this project first to my main project... but when I'm in a great documentary film which takes 3-4 minutes to open each time, it's not ideal.

    This is particularly important for people using the Pluraleyes because organize us images in first and then export to the EP, and then must bring with XMLs, and it would be great if we didn't have to do a bunch of media management manual to avoid duplicates in the project file.


    Thank you!

    R

    Hi Ryan,

    Get your feature to the appropriate string request by filling out this form: http://adobe.ly/feature_request

    Thank you

    Kevin

  • Change the 'src' in 'href' attribute, before you import XML

    I need to change the 'src' in 'href' attribute (< img scr = "...) (' >) before importing an XML document. I think that you could do with XSLT, you can add a script to import XML documents. But I don't know much about XSLT...

    Could someone give me an idea?

    Thanks in advance...!

    Piece of cake. This is a transformation of identity, except that it filters the attributes 'src ':

    
    
    
      
        
      
    
    
      
          
       
    
    
    

    See http://stackoverflow.com/questions/2679443/how-do-i-rename-an-attribute-using-xslt

  • Is it possible to import xml into Adobe Muse to fill the content similar to InDesign?

    Is it possible to import xml into Adobe Muse to fill the content similar to InDesign?

    The only way I see that this would be possible through the use of JS that you can insert by using the object-> the option Insert HTML code, you can retrieve the XML to the HTML from here - http://www.w3schools.com/xml/xml_to_html.asp

    In order to check this, simply download the sample XML file from the following location - http://www.w3schools.com/xml/cd_catalog.xml and save it somewhere locally. Now to add this file to your Muse project using the file-> add files to the download option, then it appears in the active panel.

    Add the code to your page and update the path that references the file cd_catalog.xml to assets/cd_catalog.xml. Now on the preview of the page in the browser, you should see the HTML populated from the XML.

    Thank you

    Vinayak

  • documentPreferences of an imported XML

    Hello

    I'm putting my documentPreferences of an imported XML as below and I get - "No data of the requested type" for mytrimh, could you let me know what am I doing wrong please.

    < code > snippet

    function mySnippet() {}

    fragment of <>

    Opens an existing document. You will need to enter your own file path

    var app.open (File("C:/OpenDocument.indd"));) = myDocument

    myDocument.xmlElements.item (0) .importXML (File("C:/adlib.xml"));)

    var myXMLViewPreferences = myDocument.xmlViewPreferences;

    myXMLViewPreferences.showAttributes = true;

    myXMLViewPreferences.showStructure = true;

    myXMLViewPreferences.showTaggedFrames = true;

    myXMLViewPreferences.showTagMarkers = true;

    myXMLViewPreferences.showTextSnippets = true;

    }

    < prefs >

    function myPrefs() {}

    myDoc = app.activeDocument var

    var mytrimh = myDoc.xmlElements.item (0).xmlElements.item (0).xmlElements.item (-9);

    var mytrimw = myDoc.xmlElements.item (0).xmlElements.item (0).xmlElements.item (10);

    myDoc.documentPreferences.pageWidth = "mytrimh";

    myDoc.documentPreferences.pageWidth = "mytrimw";

    Oh, thank you very much for your help. ITI works if it is still an XML element or not, as I have tried

    var mytrimh = myDocument.xmlElements.item (0).xmlElements.item (0).xmlElements.item (9) .xmlContent;

    This changed to text, but all two worked with = Number (mytrimh.contents).

  • File in the import XML dialog box?

    Question fast and easy if all goes well:

    What is the javascript format to select an XML file manually? I know that's not it:

    / * Import XML manually

    myDocument.importXML is File.openDialog ("choose the current XML file");.

    */

    I have my project works well, but I decided to get the user to manually select the XML in case they have uploaded a second version, named (for example) data - 1.xml and not "Data.xml". It is up to them to choose the most up-to-date XML, then we can also name the XML with a datastamp.

    Thanks for this any any other help on this forum - I have pretty little hair out because it is...

    Simon.

    Hi Simon,.

    Can you please try the JS code below and let me know if you have any questions all.

    var myDoc = app.activeDocument;
    var myXMLFile=File.openDialog("Choose the current XML file");
    myDoc.importXML(File(myXMLFile));
    myDoc.xmlElements[0].placeXML(myDoc.pages[0].textFrames[0]);
    

    THX

    csm_phil

  • Import XML removes a space after the xref element

    Hello

    FM10 is not patched, WinXP SP3

    I stumbled on a very serious problem that I am unable to replicate, but not solve. When I import XML (custom), no spaces < xref > following is deleted. I don't know if it's exclusive to elements of reference or any element without content... but for sure, it happens with xrefs.

    Here's a zip with the example files with which I am able to reproduce this. The XML file has two < xref > s, separated by 'and '. When you import the XML (using the DTD, the rules and template provided), the space before the "and" is deleted.

    http://www.weststreetconsulting.com/downloads/test.zip

    I disabled all my personal plugins and all DITA plugins I could find, same thing.

    I don't know if anyone has the time to watch it, but I would be very grateful if someone could confirm the problem. This caused a real mess in my source files I can't correct using nonbreaking spaces, but it's really a pain and very suboptimal.

    Thank you

    Russ

    Hi Russ...

    This is a known issue for the DITA files and can also be the cause of the problem that you see. This has been fixed in the latest patch, as long as you use a client of import and export which was rebuilt with latest libraries FDK. (No doubt if you use the client by default, it should "work" once you install the update.) I posted this to the framemaker-dita some time ago Yahoo Group...

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

    If you use a FM10 DITA (with DITA-FMx or not), you may have noticed that after conrefs inline spaces are missing. Apparently the FM10 introduced certain areas of standardization, which was a little too aggressive.

    This can be corrected in a future update, but until you can fix it by doing the following change to the maker.ini file. In the Preferences section, you can change that...

    RemoveExtraWhiteSpacesOnXMLImport = we

    for this...

    RemoveExtraWhiteSpacesOnXMLImport = Off

    And all is right with the world once more.

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

    I hope this will fix your problems... but I would install the update anyway, since it solves a number of other bugs.

    See you soon,.

    .. .Scott

  • InDesign, Import XML, switching to and from possible design multi-column?

    I have a question that may or may not require a script solution. I have a data source external generation text referenced XML file that I will not flow into a book. Normally, the book is a two-column layout, but there are illustrations (and sometimes pieces of explanatory text) which should cover both columns. I've built examples of use of reflow smart text for simple and updated column in multi-column page layout. Using one of these with the active smart text reflow works beautifully.

    Ideally, I would like to a XML tag that says "start spanning two columns now", inserts a large illustration (could also be a piece of text however) and another that says "return to normal 2 columns. I did a number of experiments (all unsuccessful) I can't seem to get a working solution. I really like the XML import, but if this is not possible, I'm willing to look at other approaches.

    Has anyone had a similar problem?

    As a gross illustration...

    Lorem ipsum dolor sit amet, adipiscing elit computer.

    CRAs quis ligula EST. SED dictum erat an EST porta in

    dignissim nisl ultrices. In and convallis elit. Curabitur pretium

    < HYPOTHETICAL_SPAN > magna EU ornare, tellus faucibus total, placerat vitae arcu fringilla

    Nulla non sapien ligula. Vestibule vel mauris and pellentesque erat

    Nunc. Vestibule total ac nulla ornare EU ultricies sapien tincidunt < / HYPOTHETICAL_SPAN >

    so. In metus, id erat auctor gravida dignissim

    eget dignissim erat dictum nisl eleifend porta an EST in

    Harold

    Just to be clear, when you say:

    I have a data source external generation text referenced XML file that I will not flow into a book.

    you mean import XML, not the import of text containing the tag of InDesign, correct?

    Ideally, I would like to a XML tag that says "start spanning two columns now", inserts a large illustration (could also be a piece of text however) and another that says "return to normal 2 columns. I did a number of experiments (all unsuccessful) I can't seem to get a working solution. I really like the XML import, but if this is not possible, I'm willing to look at other approaches.

    Can't you just a tag that maps to a paragraph style that allows to span columns?

  • &lt; a &gt; tag is creating error importing XML in InDesign CS5.5

    Hi all

    I do InDesign CS2 to InDesign CS5.5 update.

    I have the indt file. It was designed by using the CS2 and now converted this file using InDesign CS5.5 CS5.5 indt.

    But I am facing a problem while making the export as pdf in version CS5.5.

    I'm following steps below:

    (1) indt open the file.

    2) menu file-> import XML... [This XML file contains < a href = "Web site link" > html tag]

    (3) [no change-defalut option selected] XML import options

    (4) ideally, it should merge XML data with the indt file but this is ask me for feedback and show me "search:" dialogue [below instant check]

    Error.IDCS5.5.JPG

    I did some research and know I get this dialog search because of the < a > tag XML. When I removed the < a > tag XML, then it gives no dialog and XML imported without any problems.

    I get this XML system and I can't manually delete the < a > tag of xml.

    However I was getting any error while making import XML in the CS2 version.

    Please can someone help with this?

    When there is "http://" in the anchor tag, it will jump to the top of this entry window manual indd/indt export to PDF and it will be failed in export by the action script.

    I contacted Adobe software and it was bug. Adobe has confirmed that they would be realease the patch for even some time later, but I have not heard anything. I got the job by removing "http://" using java.

Maybe you are looking for