lundi 23 novembre 2015

Exporting Db values as a XML file

Hi am having 5 editText values where values will be coming from db. I need to export these 5 values as a xml file. I dont know how to do that since am new to android technology. Kindly help me with code.

submit_btn.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                final AutoCompleteTextView lot_binautoCompleteTextView = (AutoCompleteTextView) findViewById(R.id.lot_binAutoComplete);
                final AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView) findViewById(R.id.searchAutoComplete);

                String fiGoods = autoCompleteTextView.getText().toString()
                        .trim();

                String fiQty = editFiQty.getText().toString().trim();
                String fiUnWeight = editFiUnWeight.getText().toString().trim();
                String fiTotWeight = editFiTotWeight.getText().toString()
                        .trim();
                String lotBin = lot_binautoCompleteTextView.getText()
                        .toString().trim();

                if(fiQty.isEmpty()||fiUnWeight.isEmpty()||fiTotWeight.isEmpty()||lotBin.isEmpty()){
                    nullConfirmation();
                }else{

                mDBHelper.getWritableDatabase();
                mDBHelper.updatefiGoodsDetail(fiGoods, fiQty, fiUnWeight,
                        fiTotWeight, lotBin);
                mDBHelper.closeDatabase();


                Intent UpdAct = new Intent(MainMenu.this, ItemSummary.class);
                UpdAct.putExtra("finishGoods", fiGoods);
                UpdAct.putExtra("finishQty", fiQty);
                UpdAct.putExtra("finishUnWeight", fiUnWeight);

                startActivity(UpdAct);

            //  mSupporter.navigateTo(ItemSummary.class);
            }}
        });

Aucun commentaire:

Enregistrer un commentaire