Sequence of the Attribute

hi,
i'm build a XML with JAVA. In this XML are some TAGS with different attributes. These attribures nust be in a specified sequence. But JAVA order them always in alphabetic order.
<R f="4" sf="3" t="6"> must be <R t="6" f="4" sf="3">
my code:
Code:
Element R = root.addElement( "R" )
.addAttribute( "t", "6")
.addAttribute( "f", "4")
.addAttribute( "sf", "3");does someone know if this is possible? And how to to this?

The XML Spec says that the order of attributes is not defined and you should be able to accept them in any sequence. If you want to make sure they are in a specefic sequence because that is what a program that processes them wants, you are free to write your own serializer that puts them in an order that makes your other code happy.
However, any program that is using XML processing routines (as opposed to reading a file of XML content with your own program) should not care what order the attributes are in. Also, if someone is telling you "Give me an XML file and by the way, the attributes must be in a specific sequence" you should have them read the spec.
Look in
http://www.w3.org/TR/2004/REC-xml-20040204/#sec-starttags
where it says: Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.
You will get nowhere if you try to raise this as an issue to the people who maintain any XML-supporting code. The spec says you should not care.
It is pretty easy to accept the attributes in whatever sequence you get them, save them in something like a HashMap and when there are no more, you process them however you want.
Dave Patterson

Similar Messages

  • How to assign sequence to the attribute

    Hi,
    I want to create record in employee table, but the emp_id column should be populate from sequence.
    Where i should write coding for this to bring the next sequence val when i press the create employee button.
    That means, i want that newly created record with next employee_id based on sequence.
    How to approach this?
    please explain me the steps to this.
    Thanks in advance,
    SAN

    SAN,
    You can put it inside the Create Method of EOimpl.java.
    Number employeeId = transaction.getSequenceValue("FWK_TBX_EMPLOYEES_S");   
    setEmployeeId(employeeId);//Attribute where u want to set the generated Sequence.Regards,
    Gyan

  • What's the attribute change run? and the common sequence of a process chain

    The BW consultants of our company were gone and they used to create a complicated process chain, and we can see the sequences in the process chain is:
    Load different Master data attributes -> Attribute Change Run -> Load different master text data -> Load different transaction data.
    The sequence of the above process chain is pretty common, right?  We are pretty new to process chain and we are appreciated if someone could elaborate this and please also let us know the functionality of the Attribute Change Run variant here.
    We will reward your points and Thanks in advance!

    Hi,
    When ever u load the masterdata then it has to be activated so that the data will be available for the reporting. The Attribute change run will does the same thing. This will be applied to the Attributes and Hierarchies.
    for creation of process chains u can refer the link..
    follow the steps which is given by me..
    Re: Process chain in Generic extracter
    and refer these also..
    http://help.sap.com/saphelp_bw32/helpdata/en/65/163d3873130057e10000009b38f842/content.htm
    http://help.sap.com/saphelp_bw32/helpdata/en/8f/c08b3baaa59649e10000000a11402f/content.htm
    And u can refer some of the links in help.sap.com
    Regards-
    MM
    Dont forget to assign points if it helps, it is the right way to say thanks.
    Message was edited by: vishnuC

  • Web Service Tool - to add the attribute (to get a new TAG) for existing Obj

    Hi Gurus
    I have existing (productive) object name which we use for Letter Templates
    I need to add the new attribute but when I select it (highlight) the buttom below "Confirm selection" is not active, so when I got to "Maintain Attributes" I can't see my attribute there...
    Question is - how to do that?
    Do I need to got ot Settings first and make my WS "Not Productive" (what is the sequence)?
    Or I need to create a NEW web service (to re-place the current one) ?
    Thank you.

    hi There,
    Once the service is made Productive you can not make any changes.
    So first change it to non productive.
    Then add the attributes and again set it to productive.
    Hope this helps.
    Regards,
    Suchita

  • Right click clip in sequence to remove attributes does not work?

    Trying to get my old head around the three way color corrector. In the process when I try to right click a clip in the sequence to remove the attributes it does not work. When I do it again the filter square is still ticked. What am I doing wrong? Thanks for your help. The transition from Avid to FCP is not an easy one for me.

    so someone else might be helped, you should link to the good captain's post or explain what you were doing wrong.

  • Sequence in the JDev 11G

    Hello,
    In the JDev 10 G, it was in the class that extends of EntityImpl in the method validateEntity as show down, but in the JDev 11 G is show message error :
    JBO-28200: Validation threshold limit reached. Invalid Entities still in cache
    How i can to solve the problem?
    public void validateEntity() {
    if(getCddestino() == null)
    SequenceImpl s = new SequenceImpl("SEQ_HVDESTINO_CDDESTINO", getDBTransaction());
    Number sVal = s.getSequenceNumber();
    setAttributeInternal(CDDESTINO,sVal);
    super.validateEntity();
    }

    That error means that your code is causing an infinite loop of re-validation so after 10 times of trying to validate your entity and its still not being valid, it throws an exception so you can notice there's a logical problem in your code.
    Please see section "9.4.1.2 Eagerly Defaulting an Attribute Value from a Database Sequence" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html for more information on this. The validateEntity() method is not the best practice place to put defaulting logic of this type.

  • Sequence of the classes called in a standard BADI

    Hi guys,
       I have a problem on the sequence of the classes called in a standard BADI occuring in different system.
       In the DEV system, the sequence called is A, B, C (Just to illustrate). But, in the QA and PROD system, the sequence called is B, C, A. Versions of each objects have been compared and found to be the same.
       Any ideas how to solve this?
       Thanks!

    Hi Ndruzz,
    Every BADI by default Implements an INTERFACE which already contains some methods with parameters.
    So you have to find the relavenet method based on the related paramters (by checking the fields in that paramters) you have to double click on the method and to write the code.
    see the doc
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.

  • How to keep track of the sequence of the BSP Pages being invoked.

    Hi,
    How to keep track of the sequence of the BSP Pages being invoked.
    I have a BSP Page A.htm. There are two other pages B.HTM and C.HTM in the same BSP Application.
    The page B.HTM has a link A.HTM. The page C.HTM also has a link A.HTM. On clicking  these links the Page A.HTM would be invoked. Is there any way to keep track which BSP Page  (i.e B.HTM or C.HTM) invoked the page A.HTM.
    Any input on this Regard would be of great help.
    Thanks and Regards,
    Pavithra

    Hi Pavithra,
    Declare in page attributes:
    appl_url type string
    In the onClick event of the link that calls the A.htm page , use:
    call method runtime->get_url
    receiving
    URL = appl_url.
    Now appl_url contains the url (also name) of the page that invoked A.htm .
    Hope it helps.
    Anubhav.

  • Media Encoder CC won't import a JPEG sequence to the queue

    I am running Media Encoder CC 7.2.2.29 (64-bit) on OSX 10.9.4.
    I have a JPEG sequence GoPro timelapse image sequence that I want to encode into a video clip. All files have a .jpg extension. They are 4000x3000 and have an RGB color space. The Color profile is SRGB IEC61966-21. All images are 3.9MB.
    According to the ME help I should do the following.
    To add an image sequence, choose File > Add Source. In the Open dialog box, choose the first file of the image sequence. Enable the  Sequence Import checkbox for your file type, and then click the Open button.
    I follow the instructions and select the first image in the sequence. The "JPEG File Sequence" checkbox is active and I check it and click the Open button. The dialog disappears and nothing happens. There are no warnings.
    How does one get JPEG sequences to import to the queue?
    Please advise.
    -Travis

    Yes, import into premiere work fine. The nice part about using AME directly is you don't have to have to create a project or use an old one every time you want to crunch a timelapse. Also, AME has this nice feature where it will autoname the output file IMG[FirstStill]-[LastStill] (ie IMG[GP001234-GP001297]). This was helpful because GoPros change the first number in the sequence every time you stop and start time lapse.

  • Can not see the attributes of the dimension added in an existing structure

    I have to add a formula on the attributes of a dimension that i included in anexisting structure.  But when i try to create the formula it does not show the attributes or that dimension.  Early help would be appreciated.
    Thanks in Advance
    Murali

    Hi Manish
    Yes this is a display attr.  if i change it to Nav attri. will this not effect business as this is being used.
    Thanks
    Murali

  • Can'n see the attributes in InfoCube

    hi, all,
    I loaded the master data and texts of the InfoObject 0PM_ORDER and I can see them in administrator work bench. I also loaded transactional data in the InfoCube 0PM_C01. But, when displa the data in the InfoCube, all the fields of the attributes to 0PM_ORDER are empty.
    I also enhanced the structure of the InfoCube, icluding two characteristics (0EQUIPMENT and 0FUNCT_LOC). They both are nav. attributes to 0PM_ORDER. So I maintened the update rules - the two new char have to be filled by the attrubutes of 0PM_ORDER. But, it doesn't work.
    Has any one any idea?
    thanks in advance
    best regards
    neven

    hi Neven,
    this is common things that we forget to do ...
    you can schedule this in background job - daily (after all master data loaded) - from the same menu.
    or if you use process chain, you can include the process after all master data uploaded.
    hope this helps.

  • Displaying the Attribute of a Char

    Hi All,
    I have to display a CHAR in the report. But that CHAR is an attribute of another CHAR. I am unable to display the attribute with out displaying the main CHAR means I have to display only the attribute and not the main CHAR i.e
    for ex: If I have to display the prod. hierarchy code which is an attribute of the CHAR Material, I have to display the Product Hierarchy with out displaying the Material.
    Any Ideas please???
    Best Regards,
    James.

    Hi All,
    I solved my problem with ur suggestions...
    Thanks a lot...
    Points Assigned...
    Best Regards,
    James.

  • Not getting all the attributes value from Trusted Recon in eventhandler

    Hi,
    I am not getting the values of all the attributes in hashmap from Trusted recon in eventhandler.
    Following is the hashmap value I am getting :
    Parameter Hashmap value is {re_key=1869, Email=[email protected], Role=Full-Time, act_key=22, User Login=TUser43, Xellerate Type=End-User, Last Name=User43, First Name=Test}
    Please let me know how to get all the attributes value in eventhandler. I need to take some decisions based on these attributes.
    Thanks

    You should be getting all the values in the recon event.
    To get the current user states for all the records in the bulk event use this:
    Identity[] currentUserStates = (Identity[]) eventDataHashMap.get("CURRENT_USER");
    Now when you are looping through your bulkParametersp[], you can use the same get from the currentUserStates:
    Identity currentUser = null;
    currentUser = currentUserStates[counter];
    Now if the attribute is not in your hashmap, you can use:
    currentUserState.getAttributes().get(attribute)
    -Kevini

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • Sequence header at the end of the sequence in the report

    Good afternoon everyone,
    I have a strange issue with my TestStand Report (any kind of report type) : some time ago the headers (with the name, the parameter's values, the module time, the status) of the sequence and sub-sequence were at the begining. Now they are a the end of the sequence, which means instead of having the status of the sequence first, I have the status of all the steps contained in the sequence BEFORE having the status of the sequence.
    I have checked and double checked the Report options : nothing tells that the headers must be at the end.
    I have 2 bench on which my sequences are running and one of them has the sequence headers upside down in the report and the other has the headers in the proper order. Their report options are exactly the same and I can't find where the configuration is different !
    Does anyone have some idea ? Please ?
    TestStand revision : 2010

    To Norbert : 
    The steps in the body are ok, in the correct order yes.
    I've attached two extract of report (check the Report Correct first), change the extention from ".txt" to ".html", the html one wasn't authorized by the forum.
    To jiggawax
    I'm not using XML format, only text or html. Where is located the ReportOptions.ini file ? I cannot find it with a basic search, could it be hidden ? As I am not managing this file in the configuration of the benches, it might be the origin of the problem !
    Both benches are running the same client sequence indeed : the client sequence are located on a network reachable by the benches.
    I doubt that one the client sequence can override a report callback but afterall I should make sure of this possibility.
    Thanks for your help !
    Attachments:
    Report Correct.txt ‏12 KB
    Report Upside down.txt ‏15 KB

Maybe you are looking for