Save user data in an XML file

Hello

In my application, I want the user to be able to generate content (in a TextField or TextArea), then save it somehow and be able to view the next time it opens the application. I know how to display data that is stored in an XML file and I know how to get a string to a TextField or TextArea. Is there a way to store these data in a XML file and therefore also change the size of the XML file?

The XML file looks like this:


    
        
        
        
        
    

I want to thank this file as it has more data in a collection and there more collections as well. Is it possible to do in QML?

If there are other technologies that are easy to learn (I'm not good at C++ so please suggest something which is usable with QML) and more sense in my case please let me know.

Concerning

JSON is another option if you are just writing data on when you're done and read in when you start again. It really depends on what exactly your usecase.

SQL is very good to change your database on the fly. QSettings is good for small pieces of configuration data (mute Audio setting, things like that.)

JSON is good for something to read that you just read or write once. You won't be build and write a JSON file, whenever you change data.

XML is in the same boat as JSON, except that it is more difficult to work with in most of the cases (which is an element, and what is an attribute?). I really wouldn't recommend it unless you get the XML from somewhere else or if you really need the power and flexibility, it provides (you don't almost certainly)

Tags: BlackBerry Developers

Similar Questions

  • Extract data from an xml file takes almost an hour to 2.5 M data.

    Hello

    Any help would be much appreciated. Extract data from an xml file takes almost an hour to 2.5 M. data is there a solution to this.

    WITH t AS
    (SELECT XMLTYPE (response) pass FROM dual
    )
    SELECT
    b.entity_id,
    c.INSTANCE_ID,
    d.attribute_id,
    d.DATA_TYPE,
    d.ATTRIBUTE_VALUE,
    d.outcome_style
    T,.
    XMLTABLE (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , ' SOAP - ENV:Envelope / SOAP - ENV:Body / typ: assess-response/typ: global instance / typ:entity'
    PASSAGE t.col
    Path of COLUMNS entity_id VARCHAR2 (256) "@id".
    path XMLTYPE res_tmp2 'typ:instance') b
    xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , "typ:instance".
    PASSAGE b.res_tmp2
    Path of COLUMNS instance_id VARCHAR2 (256) "@id".
    path XMLTYPE res_tmp3 'typ:attribute') c
    xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , "typ:attribute".
    PASSAGE c.res_tmp3
    Path of VARCHAR2 (256) COLUMNS attribute_id '@id '.
    , data_type VARCHAR2 (256) path '@type '.
    , attribute_value VARCHAR2 (256) path '.'
    path VARCHAR2 (256) outcome_style '@inferred') d;

    Thank you
    Mhand

    OK, in this case the best option is to store the answer in a binary table of XMLType (may be a temporary table if you want to) and run the query from there:

    CREATE TABLE tmp_xml OF XMLType
    XMLType STORE AS SECUREFILE BINARY XML -- default storage in your version
    ;
    
    INSERT INTO tmp_xml VALUES(XMLType(response));
    
    SELECT b.entity_id,
           c.instance_id,
           d.attribute_id,
           d.data_type,
           d.attribute_value,
           d.outcome_style
    FROM tmp_xml t,
         XMLTABLE(
           XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV"
                        , 'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ")
         , 'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/typ:entity'
           PASSING t.object_value
           COLUMNS
    ...
    
  • The data in the XML file validation

    Hi gang...

    Just got a project (not) I have to analyze and validate an xml document... the work is as follows:

    1. gather xml

    2 analyze the data

    3. validate the data

    4 insert data into db

    5 send the message to the browser

    I don't know what is the best way to go about this problem in a productive way, using everything that's out there.

    Any help would be appreciated.  (the xml file is included)

    Netpagino

    I don't know exactly what you mean by "validation of the data in an XML file.  At first glance, I interpreted your request that means you have to check that the XML file is well-formed,... that is to say, according to the DTD or schema.  But on re-reading your post, I'm not sure.

    Of course, you want to use full construction CF XML processing and querying capabilities.  (You want to use an XPath search to find the nodes, for example...)  As for the later task then check the data contained in these nodes against various business rules, well, who would take more thought.  But remember (a) that it is very much ground (so "do not re-invent the wheel"), and (b) you have all Java at your disposal if you need it.

  • Save the data to the excel file

    Hello

    I make a program reads the value of the probe via serial port... but I don't know how I can record this data in excel file... I open the example in the labview example, but I don't want to like this... becaue I use a while loop in my program that cause opened "multi" excel file... . How can I solve this problem?

    You need to think about what you want to do, not how you want to do.  I'll make a few assumptions here - adopt to your notebook loads "real."

    I guess you want to take a series of readings from a device (sensor, serial port).  I suppose you take multiple readings, perhaps their display on a table or chart, for a certain period of time.  Once you have a set of data, you want to save all the data in an Excel file.

    If this scenario is correct, there are three distinct phases to this task - implemented the data collection (open the serial port, manage the interactions of the user according to the needs), data collection (and potentially produce tables or graphs) and save the data.  Note that only step 2, collect data, involves a repetitive action appropriate for a while loop.  Once you have all the data, you can then open an Excel report, use something like Excel table easy to put the Table in the report or chart Excel easy to put a chart in the report and save the report in evidence, save the report.

    If you are using a relatively recent version of LabVIEW (2010 or later), the new generation Excel report screws are pretty easy to use.

  • How to insert data in the XML file?

    Hi guys,.

    How to insert information into an XML file. I tell you, I have a CFM file with some questions to the user

    When users submit this form within the form information is send in an XML file.

    How can insert this information in the XML file?

    When I don't have a DB?

    Thank you

    Kind regards

    Fabiano Magno Pechibella

    You must

    1. Read in the XML file
    2. Analyze the document in an XML (just one big struct) object
    3. Insert your XML code of the object where you need
    4. rewrite the XML file with your data now included

    You can Google 'ColdFusion working with XML' and find hundreds of items to help you. Here's a beginning tutorial to help you get started:

    Intermediate ColdFusion Tutorials - working with XML

  • Save the object as a xml file xml

    Hello

    I loaded my .xml file into an XML object using URLLoader; and URLRequest. I transferred some data in a table and a data grid, it handled etc.

    I now have this XML object with the updated records. So, how to save it to an .xml file so the system can read the documents/data in it if necessary?

    Thank you

    BadFortune,

    > I wasn't planning on using on in the flash IDE, I just wanted to
    > to use as a standalone .swf file I could run from any
    > machine with flash player, for watching/editing captions.

    Sounds like an ideal candidate for an AIR application!
    ( http://www.adobe.com/products/air/) AIR provides more features that
    running Flash Player, including the ability to write files to the hard drive
    drive. He works directly with Flash (and other technologies), so should be
    feel quite familiar to what you have already seen in AS3. Indeed, search
    the logo of AIR in the docs and you will see specific AIR APIs.

    http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/index.html

    > Can I trace only the output to a file within the IDE? What AS3
    > class should I use for this?

    To trace output to the Panel of output in the IDE, use the global trace()
    function. To save a file in AIR, see the File class.

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Data from the XML file

    Hello

    The attached xml file contains data that I would like to extract. The value of the data has the label (ubchild? name /) of ' means ".". " This can happen a number of times in the file for the names of different children.  for example

    SENS0710:10951:IntSolIrr has the value that

    742.320755

    and

    SMBAU008:154000347:m_S0 kWh has the value that

    227.458679

    and so on...

    The attached vi is very very simple and uses the vi JKI EasyXML to parse the file to a data type of labview.

    This is the point at which I need advice as to the way forward. I have reflected on the variant data, clusters, etc., but can't seem to get anything close to work.

    Someone would be kind enough to give me some tips or tricks to extract these values in a table.

    Thankl you

    Concerning

    Ray

    Hi rayclout,

    I don't have parser Xml JKI vi... But I used the default XML functions and can read the average tag. Please find the screenshot of it.

    Thank you and best regards,

    srikrishnaNF

  • Save XMP data in a TIFF file

    Hello

    I was about to save the TIFF images XMP data and got the review saying that the data would be written directly in the file. I understand that if I lose my catalog file then I lose changes I have done for the TIFF is why I was about to do. Are there disadvantages to the recording of the XMP data in a TIFF file? I keep my ships happened to worse and worse, I could do it again, but I'd rather not.

    Thank you.

    There is no real drawbacks that I know, but a better plan, or a plan that should be used in combination with recording XMP in TIF, is you need to perform regular backups of your catalog file. Then, you can not lose your catalog file. Make backups of your catalog file is mandatory (according to me), write XMP for photos is optional.

  • Loading multiple data to an XML file?

    Hello

    I have a problem loading multiple data from the same XML file. In this XML file, I have a list of dishes, I want to add to a menu. So, how can I load more data from different branches of the XML file into my text fields?

    Thanks in advance,

    Rafael Carignato

    Found a way to do it. I created X text elements named "textbox1", "textbox2", etc. Here is the code:

    var i = 1;

    var message;

    $.ajax({)

    type: 'GET ',.

    URL: "books.xml"

    data type: "xml."

    success: function {(xml)

    ($xml).find('Book').each (function () {}

    var Work'stitle = $(this).find('Title').text ();

    var sAuthor = $(this).find('Author').text ();

    sGenre var = $(this).find('Genre').text ();

    message = Work'stitle + ',' + sAuthor + ', ' + sGenre;

    Console.log ("Message:" + message);

    Console.log ("i:" + i);

    SYM. $("textbox"_+_i).html (message);

    Console.log("");

    i ++ ;

    });

    },

    });

  • Ghost of the data from the XML file

    Hi scripters,.

    I got data ghosts of my XML file by importing.

    In the file XML are 3 times the content of parent 'HALSRIEMEN-GEFL' but I understand not 5 times, I have no idea more and hope someone see the problem.

    My Plan:

    <>products-profdog

    < product >

    < item-id > < / item id >

    < type > < / type >

    < title > < / title >

    < additive > < / addendum >

    < description > < / description >

    < category > < / category >

    > < unit volume < / unit volume >

    < weight > < / weight >

    < match code > < / matchcode >

    < ean number > < / ean-number >

    <>< price-unit / unit price >

    < stock > < / stock >

    < parent > < / parent >

    < active shop > < / active-shop >

    < active catalog > < / active-catalogue >

    < sort > < / sort >

    < / product >

    < product >

    < item-id > < / item id >

    < type > < / type >

    < title > < / title >

    < additive > < / addendum >

    < description > < / description >

    < category > < / category >

    > < unit volume < / unit volume >

    < weight > < / weight >

    < match code > < / matchcode >

    < ean number > < / ean-number >

    <>< price-unit / unit price >

    < stock > < / stock >

    < parent > < / parent >

    < active shop > < / active-shop >

    < active catalog > < / active-catalogue >

    < sort > < / sort >

    < / product >

    < / products-profdog >

    My loop:

    for (i = 0; i < myRootXMLElement.xmlElements.length; i ++) {}

    for (ii = 0; ii < myRootXMLElement.xmlElements.item (i).xmlElements.length; ii ++) {}

    If (myRootXMLElement.xmlElements.item (i).xmlElements.item (ii).markupTag.name == 'parent') {}

    If (myRootXMLElement.xmlElements.item (i).xmlElements.item (ii) .silence == 'HALSRIEMEN-GEFL') {}

    Alert (myRootXMLElement.xmlElements.item (i).xmlElements.item (ii).markupTag.name "->" + myRootXMLElement.xmlElements.item (i).xmlElements.item (ii) .silence);

    }

    }

    }

    }

    I have it.

    There was a bad XML import settings.

    It must be removeUnmatchedExisting = true;

  • Impossible to analyze data from an xml file

    I try to get the strings from an xml file:

    I tried the following:

    var url: URLRequest = new URLRequest ("blog.xml");

    var xml;
    var rss:URLLoader = new URLLoader();
    RSS. Load (URL);
    rss.addEventListener (Event.COMPLETE, readRss);

    function readRss(e:Event):void {}
    XML = XML (rss.data);
    txt_field. Text = XML. Entry [1]. Author.Name;

    }

    but no result. TypeError: Error #1010:...

    I tried tracing xml and worked well.

    The xml structure seems to be too complex

    var blogList:XMLList = xml.children (); Returns a xml structure more simple but always unsuccessfully in the analysis of the parts of xml as a "title" or "author."

    Any suggestions would be greatly appreciated.

    Thank you

    var url: URLRequest = new URLRequest ("blog.xml");

    var xml;
    var rss:URLLoader = new URLLoader();
    RSS. Load (URL);
    rss.addEventListener (Event.COMPLETE, readRss);

    function readRss(e:Event):void {}
    XML = XML (rss.data);

    var ns:Namespace=xml.namespace();
    txt_field. Text = XML... NS::name [0];

    }

  • Getting data from several XML files

    Could someone please shed some light on the best way to read several external xml files through Flex? We haveabout 100 xml files (of which few are accessible by users).
    I tried to implement the following generic function which takes a file name, but when debugging it, it seems that the Manager never gets call after executing the line of service.send ()! I would much appreciate your help!

    public void fetchFileContent(fileName:String):void {//this method is called when you click on a button
    var service: HTTPService = new HTTPService();
    service. URL = "filePath /" + file name;
    service.useProxy = false;
    service.resultFormat = 'e4x ';
    service.addEventListener ("result", fileRetrievalHandler)
    service. Send();
    }

    public void fileRetrievalHandler(evnt:ResultEvent):void {}
    fileContent = evnt.result.feed; This line is never executed
    }

    "miglara" wrote in message
    News:glhase$5sr$1@forums. Macromedia.com...
    > Could someone please shed some light on the best way to read more
    > external xml files through Flex? We haveabout 100 xml files (of
    > who
    (> only little is accessed randomly by users).
    > I tried to implement the following generic function which takes a
    > filename
    > but when debugging it, it seems that the Manager never gets call after
    > executing the line of service.send ()! I would much appreciate your help!
    >
    > public void fetchFileContent(fileName:String):void {//this method is
    > called by clicking on a button
    > var service: HTTPService = new HTTPService();
    > service.url = ' filePath / "+ file name;
    > service.useProxy = false;
    > service.resultFormat = 'e4x ';
    > service.addEventListener ("result", fileRetrievalHandler)
    > service.send ();
    > }
    >
    > public void fileRetrievalHandler(evnt:ResultEvent):void {}
    > fileContent = evnt.result.feed; This line is never executed
    > }

    Try to add a fault handler and see if that goes off. Also, since you are
    use HTTPService rather than URLLoader, you should know that this will probably not
    already worked for your development environment, unless you have either changed the
    Directory of output to go on the server or you have changed some compiler flags
    to allow you to get local and access to the network at the same time. That's why
    I always use URLLoader to load XML files to relative path... it just
    works without my need to change anything.

  • I'm new to Labview. How can I save oscilloscope data in a text file?

    Hello

    I have an oscilloscope (TDS2000) connected to my computer via USB. I want to record the oscilloscope data in a text file or a spreadsheet using labview. I'm new to labview. I only know about front panel and block right now. Please include a bit of inmates explain about data acquisition. Thank you

    I already said that your question has nothing to do with data acquisition devices of NOR. This means that DAQmx has nothing to do with it. You do NOT data, as defined in the world NOR / LabVIEW. On the main page of The Instrument Driver Network , you will see a section called "using the Drivers." The links that explain how to use the driver that you downloaded. The functions that you will be sliding to diagram must be in the Instrument of e/s palette, assuming that you have installed the driver properly.

  • Data from the XML file in a large application...


    I don't know what question is asked.  The subject contains XML files and large scale applications, yet the last lines refer to write a Cluster in XML and seems to wonder if the Cluster must be a Global Variable or a TypeDef.

    A 'good idea' general is to create a TypeDef that specifies (or "sets") (almost) each Cluster that you create in LabVIEW.  This serves as a single-point cluster definition.  If you need to make changes, you change the TypeDef and variables based on it change to match.

    I do not understand why the Global Variables and TypeDefs are mentioned in the same sentence.

    Bob Schor

  • Reading data from an XML file with the same parent tag

    We have the XML file that is stored in a CLOB column. We can typecast the CLOB to XML and access to a particular value. We cannot do the same in the case of same parent tag. We read the amount claimed for LABOUR, the FREIGHT_DUTY and MEALS. Can anyone help us.

    SELECT EXTRACTVALUE (XMLTYPE.createXML (CLAIM_SNAPSHOT_STRING),'path / text () ')

    IN ln_hl_labor_hrs_on_job

    OF TAV_DC_031A_CLAIM_AUDIT_XML

    WHERE CLAIM_AUDIT_ID = 3799;

    < paymentComponents class = "dΘfinir" >

    < company.domain.claim.payment.PaymentComponent >

    < id > 30310 / < ID >

    < version > 0 < / version >

    < forCategory class = "company.domain.claim.payment.CostCategory" >

    < id > 6 / < ID >

    < version > 1 < / version >

    Meals from < name > < / name >

    < code > < code > MEALS

    < description > meal < / description >

    < / forCategory >

    < claimedAmount >

    < amount > 0.00 < / amount >

    "< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >

    < / claimedAmount >

    < /company.domain.claim.payment.PaymentComponent >

    < company.domain.claim.payment.PaymentComponent >

    < id > 30311 / < ID >

    < version > 0 < / version >

    < forCategory class = "company.domain.claim.payment.CostCategory" >

    < id > 3 < /ID >

    < version > 1 < / version >

    < name > work < / name >

    < code > < code > WORK

    < description > work < / description >

    < / forCategory >

    < claimedAmount >

    < amount > 217.00 < / amount >

    "< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >

    < / claimedAmount >

    < /company.domain.claim.payment.PaymentComponent >

    < company.domain.claim.payment.PaymentComponent >

    < id > < /ID > 30312

    < version > 0 < / version >

    < forCategory class = "company.domain.claim.payment.CostCategory" >

    < id > 5 / < ID >

    < version > 1 < / version >

    < name > point freight and duty < / name >

    < code > < code > FREIGHT_DUTY

    < description > point freight and duty < / description >

    < / forCategory >

    < claimedAmount >

    < amount > 0.00 < / amount >

    "< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >

    < / claimedAmount >

    < /company.domain.claim.payment.PaymentComponent >

    < / paymentComponents >

    Kind regards

    Franck Giri

    SQL> with t
      2  as
      3  (
      4  select
      5  xmltype
      6  (
      7  '
      8  
      9  30310
     10  0
     11  
     12  6
     13  1
     14  Meals
     15  MEALS
     16  Meals
     17  
     18  
     19  0.00
     20  
     21  
     22  
     23  
     24  30311
     25  0
     26  
     27  3
     28  1
     29  Labor
     30  LABOR
     31  Labor
     32  
     33  
     34  217.00
     35  
     36  
     37  
     38  
     39  30312
     40  0
     41  
     42  5
     43  1
     44  Item Freight And Duty
     45  FREIGHT_DUTY
     46  Item Freight And Duty
     47  
     48  
     49  0.00
     50  
     51  
     52  
     53  '
     54  ) xml_data
     55    from dual
     56  )
     57  select t1.*
     58    from t
     59       , xmltable
     60         (
     61            '/paymentComponents/company.domain.claim.payment.PaymentComponent' passing t.xml_data
     62            columns
     63              code   varchar2(20) path 'forCategory/code',
     64              amount number       path 'claimedAmount/amount'
     65         ) t1;
    
    CODE                     AMOUNT
    -------------------- ----------
    MEALS                         0
    LABOR                       217
    FREIGHT_DUTY                  0
    
    SQL>
    

Maybe you are looking for