[CS4] [JS] Exchange xml content in duplicate content results

Hello

Does anyone have a solution for this problem?

I would exchange 2 content of xml text. The result is a duplicate content, what I don't want.

The text is in element 0 = 'ABC '. The text of the element 1 = '123 '.

The result is twice the same text.

var myFirstElm = myCurrentElement.xmlElements [0] .silence;

var mySecElm = myCurrentElement.xmlElements [1] .silence;

myCurrentElement.xmlElements [1] .silence = myFirstElm;

myCurrentElement.xmlElements [0] .silence = mySecElm;

I think that the myFirstElm and mySecElm values are just pointers to the location of the memory of the original. That would explain the result.

In some other programming languages known as 'Out '.

Is it possible to share content? How to solve this problem?

Thanks for all your comments

John

just a wild guess, but have you tried a. toString()?

var myFirstElm = myCurrentElement.xmlElements [0].contents.toString ();

var mySecElm = myCurrentElement.xmlElements [1].contents.toString ();

myCurrentElement.xmlElements [1] .silence = myFirstElm;

myCurrentElement.xmlElements [0] .silence = mySecElm;

Tags: InDesign

Similar Questions

  • Monitor a URL of this XML content generates

    We have some URLS when you navigate to them, you will see XML content. What we want to do is to have in place who will go to these URLS and a FAILUREto find error string XML content. If this error string is detected, we want an alert generated.

    Is this possible? Which agent would be used?

    It's quite possible with Foglight APM components, particularly with the devices of the APM. They allow you to only look at captured http (s) network traffice use network sniffing technology.

    Http (s) sniff can run either physical or virtual (i.e. on the VLANs).

    See edocs.quest.com on:

    • Applications and application servers performance monitoring

      • Application performance monitoring and the real user experience

    Basically, you set up a filter of success for a particular request path and check the response content using a regular expression.

    Best regards, Bart

  • How to add xml with existing xml content

    Hello

    I have a requirement where I need to add the xml with the existing xml content.

    For example: this is the entry that I get every time in a loop for

    in loop1:

    < ParentType >

    < a > < /A > abcd

    < B > < /B > abcd

    < / ParentType >

    loop2 once again I get this entry.

    < ParentType2 >

    ABCD < c >/< c >

    ABCD < d >/< d: >

    < / ParentType2 >

    now my requirement is to add this XML in a variable, which is finally at the end of the loop for it should look like this

    < ParentType >

    < a > < /A > abcd

    < B > < /B > abcd

    < / ParentType >

    < ParentType2 >

    ABCD < c >/< c >

    ABCD < d >/< d: >

    < / ParentType2 >

    Thank you

    Solved my problem.

  • Problem loading XML content.

    Hello, when I open Dreamweaver CS6 I now get this message at the bottom right of the window and do not know what he's trying to tellme. Clicking on it does nothing.

    Meaasage is:

    Problem loading XML content.

    You have requested a language ("en_IL") that has no content available.

    In suggestions he shows English, United States.

    I don't know why this has happened. But I managed to get rid of this message on my computer. It seems "application.xml" file points to the incorrect language for content files folder.

    On my computer, the program is installed in C:\Program Files (x 86) \Adobe\Adobe Dreamweaver CS6. If you can navigate to this file using your file manager (in my case 'File Explorer', in point 8.1 of Windows), see the listed folders.

    On my installation, note that there is a record of language called "en_US", and there are a bunch of files that it contains. I think that this is where are stored the content files, for my installation. There is also a folder called "amt".

    Open the folder "amt". You will see that there is a load of files of the language, including en_IL and en_US. also note the files listed at the bottom of this issue, in particular the application file "." XML ". I edited this file by right clicking on it and choosing "Edit". However, when I tried to save the change, I got the message "access denied." I don't have permissions to edit and save the file. So, before editing the file once again, I changed the permissions of the file as follows.

    In the file Explorer, right click on the file "application.xml" and select "Properties". Click on the tab 'Security' "Edit" (to change the permissions). Select "users". In the lower window, click on "full control". Then click on 'Ok '. Then click 'Ok' again on the next page.

    Assuming that it worked, you should now be able to edit and save the file in the application ".» XML ".

    Then, right-click on the file name "application.xml" and choose "Edit". It's a text file, so I edited in the "Notepad". Halfway the page, you will see the term "en_IL". Change this to "en_US" (or whatever the name of the other folder is in your installation folder (see paragraph 3 above). Save the file.

    Open Dreamweaver and see if the message has disappeared, replaced by a tip.

  • run the XML content in a document

    Right now I use the following for a placement of XML workflow. Import XML with a script from the CS5 Scripting Guide. I shoot to the top of the group structure and I drag and drop the root XML element in the document, the document automatically adds pages and inserts the contents of the XML file. That's exactly what I would like to be able to do, but with a script. How can I accomplish this? Also, what would be the term appropriate for this sort of thing? I think that "reinvest the XML content in the document", but I wonder if there is a more precise term.

    Thanks for having an and any assistance provided.

    Pretty much just that, I think:

    var doc = app.activeDocument;
    var frame = doc.masterSpreads[0].textFrames[0].override(doc.pages[0]);
    frame.markup(doc.xmlElements[0]);
    

    (Not tested).

    Jeff

  • Flash CS4 does not load content www

    It drives me crazy... I have a simple code that works if it is placed on the internet / run with flash player, same load crossdomain policy file therefore is ok, but whenever I am coding in Flash CS4, it does not load my XML file. Also tried to change the publication options with (local / network files only) but nothing helps. CS4 only charge my localhost server.

    XM = new XML();
    xm.ignoreWhite = true;
    XM. Load (" http://mysite.com/content.php"); / / php generates a valid XML file
    xm.onLoad = {function (success)}
    If (success) {}
    everything is ok
    } else {}
    Dang...
    }
    }

    What Miss me?

    Well I finally found the problem is not on my computer, but the host of the site. He had a certain parameters "mod_security" that prevented the loading of the xml for Flash programming environment.

    So I guess that someone with that WO is going bonkers this same problem should contact their site administrator to ask questions on these parameters.

    Grit

  • Add image beside the import XML content

    Dear users of InDesign,

    Importing text in an InDesign template (essentially in a story).

    When I import this XML file do some tweaking with XML-rules, like adding a title.

    function AddHeading() {}

    myIdName = "AddHeading";

    This.XPath = "//phoneno [1];

    This.Apply = function (myElement, myRuleProcessor) {}

    {with (MyElement)}

    var myPhoneNo = myElement.xmlContent;

    myElement.xmlContent.insertionPoints [0] .silence = String ("phone numbers \r'");

    myPhoneNomentioning [0] .appliedParagraphStyle = app.activeDocument.paragraphStyles.item ("HeadingPhoneNo");

    }

    Returns true;

    }

    }

    What I need to do is add an Image (a phone icon) next to the additional title ("phone numbers ').

    Because everything is floating in a story, I can't have the geometric limits for this paragraph.

    Any ideas how to achieve a placement of an image in this context?

    Thank you!

    Thanks to Peter, here is the approach solve my problem:

    (adopted from pkahrel great help in this thread: Re: image of place as anchor object by finding the text...)

    function AddHeading() {}

    myIdName = "AddHeading";

    This.XPath = "//phoneno [1];

    This.Apply = function (myElement, myRuleProcessor) {}

    {with (MyElement)}

    var myPhoneNo = myElement.xmlContent;

    myElement.xmlContent.insertionPoints [0] .silence = String ("phone numbers \r'");

    myPhoneNo.words [0] .appliedParagraphStyle = app.activeDocument.paragraphStyles.item("HeadingPhoneNo");

    var anchor = myElement.storyOffset.textFrames.add ();

    var f = new File('/Users/PATHTOIMAGE/image.png');

    var f = [0,0, "10mm", "10mm"];

    var myObjectStyle = app.activeDocument.objectStyles.item ("HeadingPhoneNo");

    anchor.appliedObjectStyle = myObjectStyle;

    Anchor.contents = myElement.contents;

    anchor.geometricBounds = GB;

    Anchor.place (f);

    Anchor.fit (FitOptions.CONTENT_TO_FRAME);

    }

    Returns true;

    }

    }

  • Assign the XML content to dynamic text fields

    Hey there,

    After the search in the forums, I found that I can load files XML and content to animate CC using the XMLHttpRequest, but how do I load content in a specific dynamic text field?

    I found a few answers that confirm that we should use XMLHttpRequest and some users who made it work, but not how. Any help would be much appreciated.

    Below is how I added the request and how the dynamic field has been implemented.

    This.frame_0 = function() {}

    var xhttp = new XMLHttpRequest();

    xhttp.onreadystatechange = function() {}

    If (xhttp.readyState == 4 & & xhttp.status == 200) {}

    myFunction (xhttp);

    }

    };

    xhttp. Open ("GET","profil.xml", true);

    xhttp. Send();

    Function myFunction (xml) {}

    var xmlDoc = xml.responseXML;

    document.getElementsByTagName("nameTextField").innerHTML = / * this part is not correct, but so far I have found no better solution * /.

    xmlDoc.getElementsByTagName ("title") [0] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue;

    }

    }

    And for the text field (created by animate CC):

    this.nameTextField is new syc. Text ("", "53px 'Arial'");
    this.nameTextField.name = "nameTextField";
    this.nameTextField.textAlign = 'center ';
    this.nameTextField.lineHeight = 61;
    this.nameTextField.lineWidth = 388;
    this.nameTextField.setTransform (265,124.4);

    this.timeline.addTween (syc. Tween.get (this.nameTextField). Wait (2));

    I really hope someone can help, I spent hours looking and trying solutions.

    See you soon,.

    Luke

    As already said:

    this.mydynamictextfield.text = "hello I am text in a dynamic text field";
    

    If you need really, really specific, it would be in this case:

    this.mydynamictextfield.text = animals[0];
    
  • Ask the CLOB column (with XML content)

    1. how to extract a particular xml tag value for a column with the CLOB data type.

    Example:

    < REQUEST_DETAIL >

    PR < GROUP_TYPE > < / GROUP_TYPE >

    < GroupName > ASSET MANAGEMENT TECHNICAL DATA < / GroupName >

    < BUS_UNIT_ACRN > SCS-FCAT < / BUS_UNIT_ACRN >

    < PROJ_MGR_ID > < / PROJ_MGR_ID >

    < PROJ_MGR_NAME > Roland Roy < / PROJ_MGR_NAME >

    < / REQUEST_DETAIL >

    Select

    XmlType (provable). Extract('/REQUEST_DETAIL/GROUP_TYPE/text()').getStringVal)

    e t

    /

    example above works.

    If I do not know the order of xml tag to ask how can I get the value.

    (/ * * / / * * / REQUEST_DETAIL/GROUP_TYPE / * / *)

    2 using the DBMS_LOB. SUBSTR takes longer to run and it never returns results and session will wait status for access to LOB_INDEX content (at the same time the CLOB column is used by the application).

    Y at - it another option for faster results.

    SELECT DBMS_LOB. SUBSTR (xml_blob, 4, DBMS_LOB.) INSTR (xml_blob, "< name >", 1, 1) + 6) name.

    status,

    CNT to COUNT (*)

    OF LOG_TBL

    WHEN TRUNC (IO_DATE) = TRUNC (SYSDATE)

    GROUP OF DBMS_LOB. SUBSTR (xml_blob, 4, DBMS_LOB.) INSTR (xml_blob, "< name >", 1, 1) + 6),

    status

    Kind regards

    Veera

    Adiitional your reuirement to omit the public areas

    2729533 wrote:

    Your 1 returln sql any domain name (p099 and public - seems to search all nodes in an xml file). I only need 1 domain name (and omit the public areas)

    1. SELECT X.*
    2. T
    3. , xmltable ('(//*[DomainName!="PUBLIC"]/DomainName) [1] ')
    4. PASSAGE xmlparse (document t.XML_BLOB)
    5. THE DOMAIN VARCHAR2 COLUMNS (15) PATH '.'
    6. ) X
    7. where t.no = 317663815
  • How to write the xml content of a file (Blob data Type) with other columns in file system

    Team,
    We are currently working on oracle 11 g. Suppose that we consider the SCOTT. EMP table for our creation of the table.
    All existing columns of SCOTT along. EMP table allows to assume that this table has an additional column name emp_xml, which is of TYpe of BLOB data and it holds xml data.
    the size of the data blob for each record in this col is greater than 32 KB (normally about 1 GB), now I want to write the contents of this column along
    with enmae, empno, hiredate into an external file. Assume that if we are only to the BLOB column that is emp_xml then the code below works

    Start

    for c in (select emp_xml from your_table)

    loop

    dbms_xslprocessor.clob2file (emp_xml.getclobval (), 'YOUR_LOCATION', 'YOUR_DYNAMIC_FILENAME')
    end loop;
    end;

    but I want empno, enmae, hiredate with blob emp_xml written in the external file. Any assistance in this case welcome.

    Concerning

    max_linesize

    Maximum number of characters for each line, including the newline character,
    for this file (minimum 1, maximum value 32767). If not specified, Oracle
    provides a default value of 1024.

    Defines how much you can read or write to a single call. I have to loop through the clob object and I write a pieces of 1024. So there is no limit to how much she can write. Just test it, IT will WORK!

  • formatting in the reading of XML content

    I content read XML. the problem is the space between the lines are too big that it does not fit the text box. How can I control the space between the chips? Can I use CS6 or CC.

    Thank you

    probably just you need to delete empty lines:

    function stripF(s:String):String {}

    var MS: String = ' * $% ';

    {while (s.IndexOf (SEP) >-1)}

    Sep += ' % * &'

    }

    var a:Array=s.split('\n').join(sep).split('\r').join(sep).split(sep);

    for (var i: int = a .length-1; I > = 0; i--) {}

    If (a [i] == ") {}

    a.splice (i, 1);

    }

    }

    return a.join ('\n');

    }

  • XML: contents.replace () destroyed XML elements inside

    Hello

    I wrote a script XML rule where all the < ul > < li > is mapped to a paragraph style that uses bulleted lists. It is possible that returns occur inside the < li > elements. Before you go through the items and by applying styles with a script rule, I tried to change the return (\r) of returns (\n) cycling through all the < li > with this code:

    _node.contents = _node.contents.replace(/\r/g, '\n');  //change all returns inside <usp><li> to newline
    

    But I realized that, when there are other XML elements (for example < em > or < strong >) inside the < li >, these elements have been killed by my call of. replace().

    So my question: How can I reach evolution \r's to \n's and keep inside XML structure?

    Thanks in advance

    Tobias

    I did it with this chiseled script - function grep with emphasis on the XML element - executed after that all XML was processed and placed in the document:

      // change \r to \n in usp's li's
      app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING;
      var _root = _dok.xmlElements[0];
      var _nodeList = _root.evaluateXPathExpression("//li");
      app.findGrepPreferences.findWhat = "\\r"; app.changeGrepPreferences.changeTo = "\\n";
        for ( i = 0; i < _nodeList.length; i++ ) {
            var _node = _nodeList[i];
            if ( _node.contents != "" ) {
                _node.changeGrep();
            }
        }
      app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING;
    

    It works perfectly. Any other suggestions?

    Thank you

    Tobias

  • Creating views for DB XML content in Oracle 9i (9.2.0.4.0)

    Hello

    Please excuse my ignorance but I searched on through reams of documentation on Oracle XML DB and is extremely difficult to get information about a specific version when it evolved as radically. I develop on Oracle 9.2.0.4.0 (I'd be happy to upgrade but unfortunately my clients are less enthusiastic!).

    My questions are how and why I would create views of the XML data to use in my application. I made a snippet of XML data (according to an XSD) that I need to load into the database and then provide view in read-only data. I managed to save my drawings and insert the XML into the underlying structures of the object relationship and I now need to create views.

    For as much as I can muster in 9i I must query XML data using extractValue, for example:
     
    SELECT extractValue(xseq.column_value, '//ReferenceNumber') REFERENCE 
         , extractValue(xseq.column_value, '//ProviderName') PROVIDER_NAME 
    FROM   EXTRACT e 
         , TABLE(XMLSequence(extract(VALUE(e), '//Registration'))) xseq; 
    I also managed to get the same results by directly accessing the column 'hidden ': XMLDATA
     
    SELECT xml."ReferenceNumber" REFERENCE, xml."Provider"."ProviderName" PROVIDER_NAME 
    FROM   EXTRACT e 
         , TABLE(e.xmldata."Registration") xml 
    Issues related to the:
    (i) they are the only options I have to access the XML data in Oracle 9i? (XMLTable() looked quite interesting, but was unfortunately introduced in 10g)
    (II) given that I only need a read-only view of the data, are there benefits (other than speed) to be stored in object-relational tables as opposed to a CLOB?
    (III) is there a problem using the second method (cleaner) in relation to the first?

    Thanks a lot for you help,

    Tom Casserly

    (I) Yes. I'm sorry.
    (II) speed is the main advantage for storage GOLD regarding lead content (instead of CLOB--> pilot document by) queries. Other things I can think of is that it comforms to an XML schema, which is an advantage (you know that obey your XML file is the format defined) and a disadvantage (validation / grinding / and internal indexing off XML data will cost you performance).
    (III) it is (I think) not supported, less efficient then TABLE (XMLSequence (extract ()))

  • Problem of XML content element

    Hello

    I apply SOAP using cfhttp and I have to post the amount I receive.
    Get the values using the following code:

    < CFSet xmlDoc = XMLParse (cfhttp.filecontent) >
    < CFDump var = "#xmlDoc #" >

    but
    #xmlDoc.XmlRoot.XmlChildren [1]. XmlChildren [1]. XmlChildren [1]. Amount #.

    Returns: 29015

    I can't divide this value because it is not digital
    In fact, when I use htmleditformat = >
    #htmleditformat (xmlDoc.XmlRoot.XmlChildren [1].) XmlChildren [1]. XmlChildren [1]. Amount) #.
    It returns
    <? XML version = "1.0" encoding = "UTF-8"? "> < amounted xmlns =" http://tempuri.org/ "> 29015 < / amount >"

    How can I get the numeric value 29015 directly so that I can divide by 100 and displays 290,15

    Thanks in advance

    I found this :-)

    the answer was XmlText not XmlValue

    #xmlDoc.XmlRoot.XmlChildren [1]. XmlChildren [1]. XmlChildren
    [1]. Amount.XmlText # returns the correct value ;-)

    Thank you very much

    Magic

  • Incorrect XML content

    Hello

    Using HTTPService I read in an XML file containing hexadecimal values. However, it seems that Flex is trying to convert the numbers. Now she does not throw an error, but in the case of a value such as "660528E7" it turned into '6605280000000', which is not what I want.
    How can I prevent the Flex attempt to analyze any value in the XML file? It should just treat everything as a string.

    Kind regards
    Ruud

    What resultType do you use in your HTTPService? The default type of the object will interpret the results using the default XML decoder. You can either read the data as E4X, which will give you an XML object with all channels, or you can write your own decoder.

    Tim

Maybe you are looking for

  • HP DV7 Envy

    My dv7 HP ENVY will not start.  I turned on my laptop this morning and nothing happened.  The screen remained black and no lights, turn signals, or static, showed on the keyboard.  I plugged in the charger and still nothing, light does not come one b

  • Relocation of the old new Windows Mac

    I have an old Dell Windows XP Professional that I am retired.  I have moved to a Mac, but I would like to switch the operating system from windows to mac (for use with Parallels).  I do not have a disk, but I do not have a sticker with the product ke

  • Computer has a virus

    I have a compac computer and told me that he might have a virus called the virus "snow white." What happens is when I start the PC, it goes to the start screen, and it's like he goes. I don't have all the disks of the computer and Im stuck and don't

  • Back up photos and videos on the SD card by default using XA Ultra

    How can I save photos and videos on the SD card by default using XA Ultra? Help, please... Thank you

  • PersistentStore NullPointerExeption

    I know that this error has to do with the return and or null entry.  I can't understand how his ending with null.  I don't have to change the application of RuntimeStore to PersistentStore and this application I'm sure that missing a few things as I