XML attribute change

I need to replace the 'M05_LEMO9433_06_SE_CH05' to M05_LEMO5401_06_SE_CH05 xml attribute value

In the document with more than thousand entries

I used the following code but it does not work

function AddReturns() {}

myIdName = "AddReturns";

This.XPath = "//p//span//a";

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

with (MyElement)

{

try {}

If (myElement.xmlAttributes.item("href").value.match ("LEMO9433"))

{

Fig var = myElement.xmlAttributes.itemByName("href").value;

var fig.replace = figv ("9433', 'O5401')

myElement.xmlAttributes.itemByName("href").value = figv;

}

myElement.xmlAttributes.item("id").name = "olinkend";

} catch (e) {}

}

Returns true;

}

}

Try this:

var main  = function() {
  var root,
  xes,
  n,
  ov = "M05_LEMO9433_06_SE_CH05",
  nv = "M05_LEMO5401_06_SE_CH05";
  if ( !app.documents.length ) return;

  root = app.activeDocument.xmlElements[0];

  xes = root.evaluateXPathExpression ("//*[@*='"+ov+"']" );
  n = xes.length;

  while ( n-- ) {
  changeAttributeValue ( xes[n], ov, nv );
  }
}

var changeAttributeValue  = function ( xe, oldValue, newValue ) {
  var xas = xe.xmlAttributes,
  xa,
  n = xas.length;

  while ( n-- ) {
  xa = xas[n];
  xa.value == oldValue && xa.value = newValue;
  }
}

main();

Tags: InDesign

Similar Questions

  • XML attribute change depends on the level of chindren attributes

    var = my XML

    < principal >
    < id module = "m0" visited = "" >
    < visited lesson = "m0l1" id = "" >
    < section id = "m0l1t01" visited = "" >
    < page id = "m0l1t01p01" visited = "true" / >
    < page id = "m0l1t01p02" visited = "true" / >
    < / section >
    < section id = "m0l1t02" visited = "" >
    < page id = "m0l1t02p01" visited = "true" / >
    < page id = "m0l1t02p02" visited = "true" / >

    < / section >
    < / lesson >
    < visited lesson = "m0l2" id = "" >
    < / lesson >
    < / module >
    < / hand >

    I am currently at day level page "visited = true" by programming/runtime. I wanted to roll for topic level (all parent levels) once I showed visited state 'true' to all the pages in the section.

    You can use a recursive function to go through all the nodes in your XML to check attributes:

    // recursive function to check "visited" attribute
    function checkVisited(xml:XML):void {
                var visitedCount:uint = 0;
                for(var i:uint = 0, childCount:uint = xml.children().length(); i < childCount; i++){
                    checkVisited(xml.child(i)[0]);
                    if(xml.child(i).@visited == "true") ++visitedCount;
                }
                if(visitedCount == xml.children().length()) xml.@visited = "true";
                return;
    }
    
    var myXML:XML = 
    ; checkVisited(myXML.module[0]); // run recursive function trace(myXML);

    Trace

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • ESD context-setting shaped based on XML attributes

    Hi all

    I have some difficulty to get my EDD to format correctly based on the XML attributes. Basically, what I would like is:

    I have a few XML:

    < root >

    < elem > example text sample text sample text sample text. < / elem >

    < elem multi = "true" > example text example text example text sample text. < / elem >

    < / root >

    For items with the multi = 'true' attribute, I want to be prefixed by a ball and with a left indent of 0.14"in order to align the text with the ball.

    • Example text sample text

    example text sample text.

    Those without the attribute are simply formatted according to the paragraph format (no prefix, 0.0 left indent ")

    Example text sample text

    example text sample text.

    My EDD looks like this:

    (Container) element: elem

    General rule: < ANY >

    List of attributes

    Name: multi String

    Rules of prefix

    If the context is: [multi = 'true']

    Prefix: •

    Text format rules

    Paragraph element format: element

    If the context is: [multi = 'true']

    Basic properties

    Dashes

    Withdrawal left: 0.14 "

    After importing my XML, the prefix part works perfectly. No problem.

    However, the left based on the context does not work at all - all items inherit only the removal of paragraph (0.0 "). So it ends up looking like this:

    • Example text sample text

    example text sample text.

    I can't understand this. No formatting in ESD does not replace the formats specified paragraph or something?

    Any help would be greatly appreciated.

    Thank you
    Carl

    Please do not take into account the incomplete answer, it seems to me having posted. What I started to say is:

    Carl,

    Format of the item rules override formatting that it inherits from its parent, as well as modalities parentElement must not interfere with those that you specify for prim.

    I don't see the problem, and without actually opening the file in FM, it is difficult for me to guess what might be wrong.  A number of things that I do are:

    (1) set another property in the rule, for example, to set the font size to 70pt and changes the left indent. A change in font size will confirm that the rule was actually fired.

    (2) inspect the left indent in paragraph Designer. Maybe you have set it to 0.14pt instead of 0.14 to?

    -Lynne

  • How to normalize/linearize whitspace in XML attributes?

    Hello

    I have data in a CLOB column I need to appeal to an XML attribute. The data may contain CR, LF and tabs - that the XML must be preserve way standardized/linearized (that is to say using & #10; & #13; etc.)

    I tried using XMLROOT - it deletes the line a total break.

    I tried to use XMLSERIALIZE - when finished with clause VERSION it also suppresses the newline, when without the VERSION, it keeps the jump line but not standardized.

    Do not use these preserves the jump line - but not standardized.

    Is there a bed in order to standardize XML - or should I use replace nested?

    Examples below.

    Thanks in advance.

    SQL> set long 20000
    SQL> set lines 1000
    SQL> set pages 1000
    SQL> select * from v$version
    
    
    BANNER                                                                          
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production    
    PL/SQL Release 11.2.0.3.0 - Production                                          
    CORE 11.2.0.3.0 Production                                                      
    TNS for Linux: Version 11.2.0.3.0 - Production                                  
    NLSRTL Version 11.2.0.3.0 - Production                                          
    
    
    5 rows selected.
    SQL> -- as XMLTYPE, newline (chr(10)) is preserved, but not normalized
    SQL> select XMLELEMENT("A",
            XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                     )
    from dual
    
    
    XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT"))
    ---------------------------------------------------------
    <A ID="1" TXT="2                                         
    3"></A>                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    1 row selected.
    SQL> -- as CLOB, newline (chr(10)) is preserved, but not normalized
    SQL> select XMLELEMENT("A",
            XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                     ).getclobval()
    from dual
    
    
    XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")).GETCLOBVAL()
    ----------------------------------------------------------------------
    <A ID="1" TXT="2                                                      
    3"></A>                                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    1 row selected.
    SQL> -- with XMLROOT - newline is removed
    SQL> select XMLROOT(
            XMLELEMENT("A",
             XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                      ),
                   VERSION '1.0')
    from dual
    
    
    XMLROOT(XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")),VERSION'1.0')
    -------------------------------------------------------------------------------
    <?xml version="1.0"?>                                                          
    <A ID="1" TXT="2 3"/>                                                          
                                                                                   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    1 row selected.
    SQL> --with XMLSERIALIZE without VERSION clause - newline is preserved but not normalized
    SQL> select XMLSERIALIZE(DOCUMENT
            XMLELEMENT("A",
             XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                      )
                       )
    from dual
    
    
    XMLSERIALIZE(DOCUMENTXMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")))
    -------------------------------------------------------------------------------
    <A ID="1" TXT="2                                                               
    3"></A>                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    1 row selected.
    SQL> --with XMLSERIALIZE with VERSION clause - newline is removed
    SQL> select XMLSERIALIZE(DOCUMENT
            XMLELEMENT("A",
             XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                      )
                       VERSION '1.0')
    from dual
    
    
    XMLSERIALIZE(DOCUMENTXMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT"))VERSION'1.0')
    -------------------------------------------------------------------------------------------
    <A ID="1" TXT="2 3"/>                                                                      
    1 row selected.
    SQL> --doing replace works, but seems "un-natural" and very inefficient
    SQL> select replace(
            XMLELEMENT("A",
             XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT")
                      ),
            chr(10),'&#10;')
    from dual
    
    
    REPLACE(XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")),CHR(10),'&#10;')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    <A ID="1" TXT="2&#10;3"></A>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    1 row selected.
    

    Question still pending, if anyone has another way - or knows for sure replace is the only option.

    Replaces nesting calls is probably the only option, of course, but not the way you have tried in your examples.

    Do replace it at an earlier stage, directly on the data source.

    Here's how I'd do:

    SQL> set define off
    SQL>
    SQL>
    SQL> select xmlserialize(document
      2           xmlelement("A",
      3             xmlattributes(noentityescaping
      4               1 as id
      5             , replace(
      6                 dbms_xmlgen.convert('X'||chr(10)||'Y')
      7               , chr(10)
      8               , '
    '
      9               ) as txt
     10             )
     11           )
     12           no indent
     13         )
     14  from dual ;
    
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    --------------------------------------------------------------------------------
    
    

    1. use DBMS_XMLGEN. CONVERT to handle reserved characters.

    2-using REPLACE to manage a specific entity escape

    Option NOENTITYESCAPING 3 - use to keep the entity references comes to be presented

  • How to handle xml attributes?

    Hallo,

    I am new to Livecycle and I have some difficulties to understand how reading/identification of the attributes XML in LiveCycle Designer.

    If I drag-and - drop items (#data of display data), they appear without problems. But if I drag an attribute (@attributename) they always show the empty to the PDF.

    For example, I have an XML file that looks like this:

    < product >

    ....

    < price >

    < ParamPrice visible = "true" >

    < prixUn visible = "false" > 1.350,00 < / prixUn >

    < priceB visible = "true" > 1.350,00 < / priceB >

    < price visible = "true" > 20.00 < / price >

    < price visible = "false" > 0,00 < / price >

    < / if >

    < NouveauPrix visible = "true" >

    < prixUn visible = "false" > 1.350,00 < / prixUn >

    < priceB visible = "true" > 1.350,00 < / priceB >

    < price visible = "true" > 20.00 < / price >

    < price visible = "false" > 0,00 < / price >

    < / sonderpreise >

    < / price >

    ...

    < / product >

    I tried to link like this: price.oldprice. (visible.value == "true") .priceA, but it does not work.

    I can´t really find some good information about the manipulation of XML attribute in LiveCycle. Can you please help me or tell me where to find more information on this topic.

    Thank you!!!

    What about Kat

    It is not the relationship between the presence of the object property and your visible attribute to date.

    But you can use a script to create such a thing.

    Put this in the event layout: ready for a text field, you want to be hidden or shown depending on the value of the visible attributes.

    this.presence = this.dataNode.visible.value === "true" ? "visible" : "hidden";
    
  • How to remove the value of the XML attribute in the Indesign file with javascript

    Hi all

    How to remove the value of the XML attribute in the Indesign file.

    1.jpg

    What error is this?

    in any case try this as well (one another),

    var myDoc = app.activeDocument;
    attrDelete(myDoc);
    function attrDelete(elm)
    {
        for (var i = 0; i < elm.xmlElements.length; i++)
        {
            try{
                for(j=0; j
    

    Vandy

  • Set XML attributes to multiply items

    Hello world

    This is my situation. I have a document with multiple pages and multiple objects on each page.

    now, I want to get the coordinates and dimensions of an object and write the data as an XML attribute.

    The script should do this for each object in my document.

    That's what I got so far:

    function creatAtt() {}

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

    var myObject = app.selection [i];

    var myXMLobject = myObject.associatedXMLElement;

    var ycoords = myObject.geometricBounds [0];

    var xcoords = myObject.geometricBounds [1];

    var width = myObject.geometricBounds [3] - myObject.geometricBounds [1];

    var height = myObject.geometricBounds [2] - myObject.geometricBounds [0];

    myXMLobject.xmlAttributes.add ("Y-coordinate", ycoords.toString () + "px");

    myXMLobject.xmlAttributes.add ("X-coordinate", xcoords.toString () + "px");

    myXMLobject.xmlAttributes.add ("Width", width.toString () + "px");

    myXMLobject.xmlAttributes.add ('Height', height.toString () + "px");

    }

    }

    creatAtt();

    When I select an object and run the script he writes only the data for the selected object, not for all objects. Someone a tip how to fix?

    Hi Sebbomatico,

    Now, I remove the attributes at the beginning and after I generated. Please check this code and the snapshot.

    var myDoc= app.activeDocument;
    var myPages = myDoc.pages;
    for (var i = 0; i < myPages.length; i++){
        var myActualPage = myPages[i].pageItems;
        for (var j = 0; j < myActualPage.length; j++){
           var myObject= myActualPage[j];
           var myXMLobject = myObject.associatedXMLElement;
           var ycoords= myObject.geometricBounds[0];
           var xcoords= myObject.geometricBounds[1];
           var width = myObject.geometricBounds[3] - myObject.geometricBounds[1];
           var height = myObject.geometricBounds[2] - myObject.geometricBounds[0];
           try{myXMLobject.xmlAttributes.everyItem().remove();}catch(e){};
           myXMLobject.xmlAttributes.add ("Y-Koordinate", ycoords.toString() + " px");
           myXMLobject.xmlAttributes.add ("X-Koordinate", xcoords.toString() + " px");
           myXMLobject.xmlAttributes.add ("Width", width.toString() + " px");
           myXMLobject.xmlAttributes.add ("Height", height.toString() + " px");
           }
        }
    

  • Can someone please tell me the "see correct / more effective to get the 'status' XML ' attributes

    Can someone please tell me the "see correct / more effective to get the 'status' XML ' attributes (ID, CssClass, Description and IsActive to the XML code below):

    Implementation will be the standalone .swf file

    (XML)

    <ArrayOfLineStatus>
    <LineStatus ID="0" StatusDetails="">
        <BranchDisruptions/><Line ID="1" Name="Bakerloo"/>
        <Status ID="GS" CssClass="GoodService" Description="Good Service" IsActive="true">         
             <StatusType ID="1" Description="Line"/></Status></LineStatus>
    </ArrayOfLineStatus>

    < ArrayOfLineStatus >

    < LineStatus ID = "0" StatusDetails = "" >

    < BranchDisruptions / >

    < line ID = "1" Name = "Bakerloo" / >

    < State ID = 'GS' CssClass = "GoodService" Description = "Good Service" IsActive = "true" >

    < StatusType ID = '1' Description = 'Line' / > < / status >

    < / LineStatus >

    < / ArrayOfLineStatus >

    There is no good way with as2:

    trace(this.firstChild.childNodes[1].childNodes[4].) Attributes ['ID']);

    trace(this.firstChild.childNodes[1].childNodes[4].) Attributes ['CssClass']);

    etc.

  • Enforcement of XML attribute with a structure?

    I use xmlParse() to read an XML file into a structure and then deal with the structure (replace some of the XML attributes) and then write structure back as an XML file. The problem is that I lost the original order of the XML attributes when I convert a structure and instead end up with a new attribute for each element that is alphabetical order.

    In other: c = 'text' d = 'text' element has = "text" / >

    be rewritten in the form: element = 'text' c = 'text' d = "text" / >

    which is a problem for this application.

    Is it possible to work with XML in CF but keep ordering attribute (LinkedHashMap instead of a structure, perhaps)?

    Thank you.

    Walter

    If you need to control the order of the attributes, you must write your xml code on hand, according to the XML specification, ordering attribute must not be important, so strictly speaking your condition here requires something XML which is contrary to his intention.  And, therefore, has no way of making CF respect something that inherently isn't supposed to be respected.

    NB: "I use xmlParse() to read an XML file in a structure"... xmlParse() creates an XML object, not a struct, so what you ask in your last paragraph doesn't really sense.  xmlParse() will only create an XML object. If you want to read the XML data as something else than XML, you need to write your own function.

    The best solution here, if poss, is to remove the importance of the order attribute in your application, because it is "wrong" to deduct any order, and you do a little logic a rod for your own back based on this ranking.

    Not an answer 'just do it like this', I'm sorry, but that's what you get when the question is immersed in a Pandora's box... ;-)

    --
    Adam

  • What file Application.xml to change?

    Hi all

    I need to edit application.xml to change the location of support of VOD. I have the following files:

    ./opt/Adobe/FMS/conf/_defaultRoot_/_defaultVHost_/application. XML

    ./opt/adobe/fms/applications/vod/Application.xml
    ./opt/adobe/fms/applications/live/Application.xml
    ./opt/adobe/fms/samples/applications/vod/Application.xml
    ./opt/adobe/fms/samples/applications/live/Application.xml

    Which one should I change? The 1st or the 2nd?

    Thank you

    ./opt/adobe/fms/applications/vod/Application.xml

    Remember that it is specific on demand vod.

  • Auto DataGrid refreshing when the source of the XML file changes.

    I'm new to Flex2 and tried to look everywhere, including this forum, but I don't always have it clear.

    I want to auto-refresh of a DataGrid control that contains an XML data, whenever the XML file changes.
    I read something about data binding, but still the dataGrid control is not data refresh.
    The program should display data in real time all the time.

    I use HTTPService to connect to the XML file.

    I do not know that this is not the first time requested, so if you could me link to a site, or another post, that would be great.
    Thanks for any help,

    ######################

    <? XML version = "1.0" encoding = "utf-8"? >
    < mx:HBox
    ' xmlns:MX =' http://www.adobe.com/2006/mxml '
    Width = '100% '.
    Height = "450".
    creationComplete = "memosSv.send ()" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;
    [Bindable]
    private var memos: ArrayCollection collection;
    private function memosHandler (event: ResultEvent): void {}
    Memos = event.result.memos.memo;
    }

    []] >
    < / mx:Script >

    < mx: states >
    < name mx: State = "memoCuerpo" >
    < mx:AddChild position = "lastChild" >
    < mx:Panel width = "342" height = "402" layout = "absolute" title = "Contenido Del Memo" >
    < mx:TextArea
    x = "10" y = "10".
    width = '304 '.
    height = "342".
    cornerRadius = "10".
    Editable = "false".
    Selectable = "false".
    .Contenido Text = "{MEMOS.getItemAt (dgMemos.selectedIndex)}" fontSize = "12" / > "
    < / mx:Panel >
    < / mx:AddChild >
    < / mx: State >
    < / mx: states >

    < mx:HTTPService
    ID = "memosSv".
    ' URL =' http://222.222.221.225/distefanoRIA/memos.xml '
    result = "memosHandler (Event)" "
    showBusyCursor = "true" / >

    < mx:DataGrid
    dataProvider = "{memos}".
    width = "301".
    sortableColumns = "false".
    ID = "dgMemos".
    a click = "currentState ="memoCuerpo"" >
    < mx:columns >
    < mx:DataGridColumn width = "190" id = "columnaTitulo" dataField = "titulo" headerText = "Titulo del Mémo" / >
    < mx:DataGridColumn id = "columnaFecha" dataField = "date" headerText = "Date created" / >
    < / mx:columns >
    < / mx:DataGrid >

    < / mx:HBox >
    ##################

    Here is an example:
    http://www.CFLEX.NET/showFileDetails.cfm?ObjectID=560

    Tracy

  • POOR RECOVERY OF THE XML ATTRIBUTE VALUES

    Hi all

    I searched this forum and the web a way to get the value of an xml attribute. The solutions I found always had a problem, the values returned when concatenated without any separators, so I can't know every value.

    Here's how:

    BEGIN

    l_bfile: = BFILENAME ('CTEMP1', nome_fich);
    DBMS_LOB. FileOpen (l_bfile);
    DBMS_LOB. LoadFromFile (l_clob, l_bfile, DBMS_LOB.lobmaxsize);
    DBMS_LOB. FileClose (l_bfile);
    xmlx: = XMLTYPE (l_clob);
    Str: = xmlx. Extract('rowset/Row/@id'). GETSTRINGVAL();

    dbms_output.put_line (' :'|| id values) (STR);
    END;

    Returns the string str: 123456654321 for this example

    <? XML version = "1.0" encoding = "UTF-8"? >
    rowset <>
    < row id = "123456" >
    < name > Peter < / name >
    < / row >
    < row id '654321' = >
    < name > Louis < / name >
    < / row >
    < / lines >


    I want to get each id concatenated for example values (123456:654321) instead, I get the concatenated values (123456654321).


    Does anyone know a work around for this problem?


    Cordially Pedro.

    11.2 you can use listagg()

    SQL> with t as (select xmltype('
      2    
      3      Peter
      4     
      5     
      6      Louis
      7     
      8    ') xcol from dual)
      9  select listagg(v.val,':') within group (order by null) val
     10  from t,xmltable('/rowset/row/@id'
     11  passing t.xcol
     12  columns val varchar2(1000) path '.') v;
    
    VAL
    ------------------------------------------------------------------------------------------------------------------------
    123456:654321  
    

    If not 11.2

    SQL> with t as (select xmltype('
      2  
      3  Peter
      4  
      5  
      6  Louis
      7  
      8  ') xcol from dual)
      9  select xmlquery('fn:string-join(/rowset/row/@id,'':'')'
     10  passing by value t.xcol  returning content) val
     11  from t;
    
    VAL
    ------------------------------------------------------------------------------------------------------------------------
    123456:654321
    
  • With the help of the XML attributes in itemRenderer and labelFunction

    Hello!

    I searched for hours and read the Devguide but always impossible to find the solution to my problem.
    I have a xml returned from php like this:
    < files >
    < record id = "1" name = "name_1" type = "0" / >
    < record id = "2" name = "name_2" type = "0" / >
    < record id = "3" name = "name_3" type = "1 / >"
    < / documents >

    I can bind the result returned from the HTTPService to a data grid:

    < mx:DataGrid dataProvider = "{ret_XML.record}" width = "500" number of rows = "20" editable = "false" id = "dg" > "
    < mx:columns >
    <!-NEXT WORK! ->
    "< mx:DataGridColumn headerText ="Name" dataField="@name " width ="300"/ >
    <!- LABELFUNC don't DO NOT WORK IN LINE NEXT->
    "< headerText ="Type"dataField="@type mx:DataGridColumn " labelFunction ="labelFunc">
    < / mx:DataGridColumn >
    "< headerText ="Id"mx:DataGridColumn dataField="@id " editable ="false">
    < mx:itemRenderer >
    < mx:Component >
    <!-LINE FOLLOWING IS don't DO NOT WORK! ->
    "{< mx:Button label="{data.@id} '/ >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >
    < / mx:columns >
    < / mx:DataGrid >

    and I have a labelFunction like this:

    private void labelFunc(item:Object,_column:DataGridColumn):String {}
    return "Type:"+ item.@type; "
    }

    So, my problem is that when I bind the column to an XML attribute, it works fine but when I try to link it to an itemRenderer or use it in a function, it does not work. I'm trying for hours now, but just can't make it work.
    I tried:
    "{< mx:Button label="{data.@id} '/ >
    < mx:Button label = "{data. () @id)} »/ >
    "{< mx:Button label="{@data.id} '/ >

    and perhaps others but no luck...
    Please someone help me with this one!

    Ty:
    [Pig]

    Problem solved!

    Well, post it on the forum after I solved my problem as follows:

    So in itemRenderer just use data.attribute () with the desired XML attribute name

    And in the labelFunction:

    private void labelFunc(item:Object,_column:DataGridColumn):String {}
    return "Type:"+ item.attribute ('type'); '.
    }
    Even with itemRenderer but rather data use () item.attribute

    I hope that this is the 'official' solution too...

    [Pig]

  • Outbreak of the tasks of process definition based on multiple attributes changes

    Hi all

    I am creating a custom TAG connector to configure an LDAP accounts. I have over 100 fields defined by the user with the user object in IOM and about 60 of them will stay in sync with user accounts in LDAP. When an any of these 60 updated items for a user, I would like to than IOM for updating the LDAP user attributes.

    I know that I can add 60 jobs 'Change < field name >' to the process definition. However, it would be very inefficient for what I'm trying to do because of the number of attributes that I care. Often during major reconciliations of registration systems, several attributes will change for each user. So if 20 attributes change a user in a single transaction and I separate tasks for each attribute, which would result in 20 LDAP updates rather than one.

    So I was wondering, is it possible to have a single definition of process task that fires when one of these 60 attributes updated and include all the attributes and values that has updated as part of this operation?

    Thank you

    Delete all entries in your list of choices for the triggers. Add a task to your process definition supply Xellerate user who performs this update to your LDAP directory. Trigger the task to run in response to your task of reconciliation was updated.

    -Kevin

  • Write XML attribute

    Hello

    I would like to change the value of an attribute in an XML tag.

    I can read the value but not the modifier... any idea?

    S example code PJ.

    Thank you in advance

    Kind regards

    Alexander

    Hello alex,.

    Have you tried the examples available on our site here and here ?

    Kind regards

Maybe you are looking for