Modifing XML file supplied with my application on PlayBook

Hi all

I have an app for Blackberry PlayBook WebWorks.

It has a flash file that after reloading, reads an XML file which is of course included in the deployment of my product.

My product has to change the XML file after a picture taken using the camera.

The XML file essentially contains the path to the image that needs to be changed.

Get the path to the image is fine, but it seems to me impossible to locate the XML file that I have 'ship' with the product.

I can't find the flash applet or an other images used in the program.

What is a security thing? I was just expecting to be able to find the path of the XML file and record a new on it with the new path to the image.

dirs.app.storage.path

Hello

You should be able to reference the resources packaged in your BAR file using the local: / / / Protocol.  If you have a file settings.xml file in root of your application, so it should be local:///settings.xml.

Note: You can not change this file after it was packed. At this point, it is read-only.  If you want to update these data after the fact, I suggest to load this information into localStorage (API HTML5) at the start of the first time and changing the numbers in there.  localStorage is a persistent store where you can save the values between the application restarts.

Tags: BlackBerry Developers

Similar Questions

  • 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

  • Data file associated with the application of deployment

    I have a file of data/database (~ 256 k) I would like to include with my application, but not as a resource file.

    I know that I can group as a resource, but I want to change the file because the application is used, so may not be part of the cod file.

    I am currently thinking of the deployment of the application without the data file, and then let the app to download the data file on first use, or as a background thread (in which I may have to provide some stupid message).  I hope not to make one of these.

    Instead, is it possible to deploy the application with a file that will be written in the memory of the device (file:///store) as 1 a download?  If this is not the case, what are some viable approaches to this problem.

    Maybe this:

    http://supportforums.BlackBerry.com/T5/Java-development/resource-Installer-to-SD-card-application-SA...

    Downloading in the app is I think a different approach (and that I took).

  • have we not all documents on sample_pkg which is supplied with the Application Sampl Apex

    Hi all

    I was looking for any documentation on sample_pkg that is provided with the example of Application Apex.

    When I tried to implement the same package in a different environment, I get the error message saying "apex_error.t_error" is not set / correct data type.

    Can you please help provide pointers (what are the elements that miss me to see for existence in the new environment) on how to deploy this package to the new environment.

    Need your help please...

    Hi NS150883,

    NS150883 wrote:

    I was looking for any documentation on sample_pkg that is provided with the example of Application Apex.

    When I tried to implement the same package in a different environment, I get the error message saying "apex_error.t_error" is not set / correct data type.

    There is no introductory but comprehensive documentation on "Sample database Application".

    Reference: https://docs.oracle.com/cd/E59726_01/doc.50/e39147/demo_samp.htm#HTMDB02005

    There are documents related to the APEX_ERROR API.

    Reference:

    Please indicate the details of your environment. See: How to get answers from the forum

    Can you please help provide pointers (what are the elements that miss me to see for existence in the new environment) on how to deploy this package to the new environment.

    If the APEX is installed correctly then you should not get this error. Recompile the SAMPLE_PKG and see if the error persists.

    If the error persists, check the validity of the installation of the APEX: https://docs.oracle.com/cd/E59726_01/install.50/e39144/trouble.htm#HTMIG264

    Kind regards

    Kiran

  • Include the XML file with OTA Download

    Is it possible to include an XML file generated with OTA Download?  I am writing an app that will be distributed with a web application that comes with it.  It must be deployed on individual sites, each with its own public address, configuration settings, etc.  The config is specified through configuration of web application and then saved (and later edited/updated) in XML format in the same location as the compiled files jad/cod.  This will eliminate the need for the end user specify the public address of the web application so that provide default configuration settings.  It will be on BIS and HTTPS.  I do not expect BES as the target users will be individuals and small businesses.  I'll be providing the source if they want to make changes, but I don't want to require the end user to compile just to use "out of the box', not versions include different OS and compiled the updates I distribute the bugs/feature updates.  In addition, it will access some restricted API and they must sign.

    If there is another method to achieve this, I am completely open and still at the design stage of list/original feature on the BB side.

    Thank you

    Song

    OK, I wasn't aware of this limitation (I usually code for bes )

    other ideas would be:

    -Configure the application mail/SMS (or similar), implement a listener for it.

    -use a common server and decide what config to use during execution, (by e-mail domain, for example)

  • XML file works only with XmlDataModel

    Hi all

    I'm developing a simple picture viewer using the online service www.imgur.com. It's going to be free and without advertising that allows using the normal API pretty easy. I followed the tutorials on the dev site to send an http request and receive the response. I managed to do all that finding, but I'm stumped trying to apply the http response in my ListView.

    The response is an XML file, but with child elements rather than attributes for more information. I tried to get my response working with the tutorial here:

    Networking Dev BlackBerry tutorial

    more specifically, this part of the code

    // Create the data model using the contents of the file. The
            // location of the file is relative to the assets directory.
            XmlDataModel *dataModel = new XmlDataModel();
            dataModel->setSource(QUrl("file://" + QDir::homePath() + "/model.xml"));
    
            // Set the new data model on the list and stop the activity indicator
            mListView->setDataModel(dataModel);
    

    But I can't work. I read from different people (but not confirmed what whether doc) that the XmlDataModel cannot be used with child element type XML files? If so, can someone point me in the direction of the conversion of an XML attribute type?

    The DataSource object can manage lists XML child element, and it manages the query part of network too. It is however quite limited in its ability to manage structures complex multi-level, so it may or may not be suitable for your use. Without an example XML file, I can't say for sure if DataSource would deal with it, but it's probably something worth investigating.

  • How can I parse the XML file using the Oracle's Sql query.

    Hi all
    I have an XML file that must analyze and display the result according to the following example
    Can you please recommend me an approach to get the result.

    For example, here is my XML:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < xmlns:pi = "urn:com.workday / picof pi: Extract_Employees" >
    < IP: employee >
    < Additional_Information: pi > < pi: pi function: PriorValue = "" > Intern - masteri¿½s < / pi: function >
    < / pi: Additional_Information >
    < / pi: employee >
    < / pi: Extract_Employees >

    Databases:

    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production

    SQL > SELECT * FROM NLS_DATABASE_PARAMETERS;

    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS.,.
    WE8ISO8859P1 NLS_CHARACTERSET
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI. SSXFF AM
    NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    BINARY NLS_COMP
    NLS_LENGTH_SEMANTICS BYTES
    NLS_NCHAR_CONV_EXCP FAKE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.3.0



    The Xml file above with UTF-8 character sets which is multi bytes.

    But in my character database is WE8ISO8859P1 for example ISO-8859-1 (single-byte character set)

    SQL > SELECT extractValue (Value (x) ', ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof ' ')
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))


    which gives the following error:

    Error:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00200: could not convert from UTF-8 encoding to ISO-8859-1
    Error on line 1
    ORA-06512: at "SYS." XMLTYPE", line 295
    ORA-06512: at line 1

    Also I tried with this
    SQL > SELECT convert (extractValue (Value (x), ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof"'),'WE8ISO8859P1 ', 'UTF8'))
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))

    The same error is according to the above error message.

    Please help in this regard.

    Thank you and best regards,
    Sandrine

    You know the code of real character behind "" or you receive the file like that?

    For the record, "" is the wildcard of UTF-8 (0xEFBFBD), so that the original character of the means has already been replaced and that very probably the file was not coded properly in the first place.

    With respect to the resolution of the problem, try another method to read the file:

    SQL> select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
    
    VALUE
    ----------------------------------------
    WE8ISO8859P15
    
    SQL> SELECT x.*
      2  FROM XMLTable(
      3         XMLNamespaces(default 'urn:com.workday/picof')
      4       , '/Extract_Employees/Employee'
      5         passing xmltype(
      6                   dbms_xslprocessor.read2clob(
      7                     'COP_DIR'
      8                   , 'XML_Issue_227176.xml'
      9                   , nls_charset_id('AL32UTF8')
     10                   )
     11                 )
     12         columns job_title varchar2(30) path 'Additional_Information/Job_Title'
     13       ) x
     14  ;
    
    JOB_TITLE
    ------------------------------
    Intern -  Master¿s
     
    
  • How to remove an xmltype table .xml file?

    Hi expert,

    I'm in I'm in Oracle Enterprise Manager 11 g 11.2.0.1.0.
    SQL * more: Production of release 11.2.0.1.0 killed him Feb 22 11:40:23 2011

    I inserted 3 .xml files in an xmltype table: DOCUMENT

    SQL > SELECT OBJECT_VALUE FROM document;

    OBJECT_VALUE
    -----------------------------------------------------------------------
    <? XML version = "1.0" encoding = "WINDOWS-1252"? >
    <? XML-stylesheet href = "http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type = "text/xsl"? >
    < document xmlns = "" urn: hl7 - org:v3 "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLoc"
    action = "" urn: hl7 - org:v3 http://localhost:8080/home/DEV/xsd/spl.xsd ' classCode 'DOC' = > "
    < root id = "5ca4e3cb-7298-4948-8cc2-58e71ad32694" / >
    < code = c '51725-0.

    <? XML version = "1.0" encoding = "WINDOWS-1252"? >
    <? XML-stylesheet href = "http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type = "text/xsl"? >
    < document xmlns = "" urn: hl7 - org:v3 "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLoc"
    action = "" urn: hl7 - org:v3 http://localhost:8080/home/DEV/xsd/spl.xsd ' classCode 'DOC' = > "
    < root id = "03d6a2cd-fdda-4fe1-865d-da0db9212f34" / >
    < code = c '51725-0.

    <? XML version = "1.0" encoding = "WINDOWS-1252"? >
    <? XML-stylesheet href = "http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type = "text/xsl"? >
    < document xmlns = "" urn: hl7 - org:v3 "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLoc"
    action = "" urn: hl7 - org:v3 http://localhost:8080/home/DEV/xsd/spl.xsd ' classCode 'DOC' = > "
    < root id = "09ff06d6-8b85-43dd-b5cc-e22d00f02bd0" / >
    < code = c '51725-0.

    I tried to remove an xml file which with root id = "03d6a2cd-fdda-4fe1-865d-da0db9212f34'"

    delete the document
    where xmlexists (' $p/document/id [@root = "03d6a2cd-fdda-4fe1-865d-da0db9212f34"]' in PASSING OBJECT_VALUE AS "p");

    but failed.
    Y at - it that can help any expert?

    Thank you very much!

    Cow

    Published by: cow on March 11, 2011 19:02

    Hello

    Namespace problem.
    You must declare it in the XQuery Prolog:

    DELETE FROM document
    WHERE XMLExists( 'declare default element namespace "urn:hl7-org:v3"; (::)
                      $p/document/id[@root=$root_value]'
                     passing object_value as "p",
                             '03d6a2cd-fdda-4fe1-865d-da0db9212f34' as "root_value" )
    ;
    
  • Write in an external xml file

    OK, so ive been reading on xml and found theres this big thing appeal. appendChild(). that let your add a node to an xml file.

    Here's the catch, I can write in an external xml file, without the need to load it, DIRECTLY through flex?

    or I have to use some php i.e. backend


    Thanks heaps!

    ojk007

    The Flash Player, when it is hosted by a browser, severely limits access to the resources of the host computer. In other words, you cannot read and write files. If the XML file resides on the server, then you can use the code server-side (e.g. PHP) and edit the file, or you can load the XML file into your Flex application on the client computer, change it, then refer to something that can write the file.

  • Create XML file and make available via WebDAV

    Hello

    I'm new to XML DB ;-)
    Has anyone got a short example how to create an XML file (possibly with XSD in XML DB schema file) via XML DB and make it available via WebDAV?

    Thanks in advance.

    Best regards
    Martin
    SQL> select xmltype(cursor(select * from dual)) from dual;
    
    XMLTYPE(CURSOR(SELECT*FROMDUAL))
    -----------------------------------------------------------------------------
    
    
     
      X
     
    
    
    1 row selected.
    
    SQL> DECLARE
      2
      3    XMLDoc XMLType;
      4
      5  BEGIN
      6
      7    select xmltype(cursor(select * from dual))
      8    into   XMLDoc
      9    from dual;
     10
     11    IF (DBMS_XDB.CREATERESOURCE('/public/dual.xml',XMLDoc)) THEN
     12       DBMS_OUTPUT.PUT_LINE('Resource is created');
     13    ELSE
     14       DBMS_OUTPUT.PUT_LINE('Cannot create resource');
     15    END IF;
     16
     17    COMMIT;
     18
     19  END;
     20  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select xdbURIType ('/public/dual.xml').getClob() from dual;
    
    XDBURITYPE('/PUBLIC/DUAL.XML').GETCLOB()
    -------------------------------------------------------------------------
    
    
      
        X
      
    
    
    1 row selected.
    
    -- You will see an /public/dual.xml file via the WebDav functionality
    
  • Apple script to check the part of iTunes library XML with another application.

    Y at - there no apple for script

    Set 'share the XML library with other applications iTunes'. under the name selected

    • iTunes
    • Preferences
    • Advanced tab...

    I want to read itunes Media Library .xml, but in the last version of iTunes without xml is created by default,

    so I want this XML created by my application through the apple script.

    iTunes12.4

    I don't think you can change that setting via AppleScript, however once you have enabled then the XML file will be generated and updated every time that the library is updated.

    TT2

  • Problem with emulator no config.xml file found in the root of the file .zip Blackberry 10 ripple

    I just started development for blackberry 10. I had developed application in the native language. But with blackberry 10 I get "no config.xml file were found at the root of the .zip file" when I run my Hello World application on emulator of the ripple.

    Help is appreciated thanks.

    Here what I got on emulator ripple

    Here's my Helloworld project structure

    Your config.xml file is probably invalid.

    Copy and paste it into this XML validator. http://www.w3schools.com/XML/xml_validator.asp

    If there is a training error will not be able to correctly parse.

  • Invalid application - cannot find the config.xml file archive

    I'm new to webworks development... I created a sample config.xml and index.html in the folder Helloworld and made a Zip file...

    Then using ripple I packed up the app and the. Cod files are generated correctly...

    But I was not able to pack and sign using ripple, if I had the signature keys added to the bin folder of the SDK correctly...

    So I tried bbwp command line argument to achieve the same... But it has ended up with the error "Invalid application archive - cannot find the file config.xml.

    What is the problem that I do with the archieve file?

    How to use eclipse for development for the Webworks 2.3.1.5 sdk?

    My guess is that you have a HelloWorld inside your zip file and the file config.xml and index.html are inside this folder. The config.xml file must be in the root and must reference the index.html file, wherever it is in the zip directory structure.

  • Open file failed with webstart unsigned application

    Hello

    Is it possible to open a document in the base application registered user (on the operating system) to an unsigned Java webstart application?
    I don't mind if the user receives a warning, but the only thing I found was the ability to save a file (also with a warning to the user), but I would like to automatically open the document generated by the webstart application in the default application on the operating system that is recorded for the file association. In this case, either a file *.xml or *.xlsx (Excel/OpenOffice)

    Any ideas?

    You can use BasicService.showDocument () to do this, but you will get a white windows open in the default browser.

  • Problem with Framemaker 9 Dita XML Files in Framemaker 10

    I just upgraded to Framemaker 10. I meet a number of problems when trying to work with my help of Dita XML topics, that were last saved in Framemaker 9.

    1. using the default Dita model

    When I open one of my documents in Framemaker 10, the Dita 1.2 model ditabase.fm is automatically applied. Everything seems fine. But then when I convert the XML using Eclipse (which is essentially the html, so we go from XML to HTML format) using Dita Open Toolkit ant scripts, I see this message:

    [pipeline] [DOTJ013E] [ERROR] failed to parse the referenced file 'html\c_licensing.xml' cause from under exception. Please correct the base on the exception message reference.
    [pipeline] c_licensing.xml 25:Attribute 'xmlns:ditaarch' of the line must be declared for the element type "dita".

    Then, I opened the xml file in a text editor, and I saw this on line 25:

    < dita xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/" > ""

    25 line seems to me. Am I missing something?

    2 go to a model of Dita 1.1

    I tried to get around the above problem. In Framemaker, I tried to put another structured as the default application. I closed all files and choose the structured Dita 1.1 application default (it defaults to the Dita 1.1. Composite app.)

    Then I tried to open my file: I got this message inside Framemaker:

    'Failed XML validation. Continue?
    Error to the [path of ACCESS], line 25, tank 72, Message: attribute ' {http://www.w3.org/2000/xmlns/} ditaarch' is not declared for the element "dita"

    Sounds familiar, isn't?

    I went from Dita 1.1 by default. Composite application structured with the Dita 1.1. Application of structured theme. Then I messed the source file and saved. The messages that I got in the FrameMaker log window included one above, plus I had a variety of messages to unknown element, things like:

    Element unknown dita.

    notion of unknown element,

    various attributes are not reported for concept,

    element unknown conbody.

    If I go to the Dita 1.1 mash all these messages diappear except this one:

    Attribute ' {http://www.w3.org/2000/xmlns/} ditaarch' is not declared for the element "dita"


    My conversion scripts of Ant in the Dita Open Toolkit are still unable to process this file. They give the same message as above in (1) and the file is not converted to HTML.


    Can someone help me with this problem? I also posted this question in the Group of users of Dita on Yahoo Groups. If I get an answer in one place, I'll post it in the other.

    Thank you

    Nina P.

    [transferred to dita-users]

    Hi Nina...

    The xmlns:ditaarch attribute must be the "topic" not dita root element. If demand for FM10 structure is the award that it is wrong. You create composite themes (multiple topics in a single file under the root of dita)? If this isn't the case, you can get rid of the total dita element and who can "solve" the problem.

    The first mistake you get (#1) says that the xmlns:ditaarch attribute must be declared (that is, defined in the DTD)... It's not (because it is not supposed to be there (as I know). This is not to say that it must be declared in the DITA file.

    Even for the #2 error... the composite 1.1 app is apparently set up correctly, so it's saying the same thing that the Old Testament said... "you have this attribute in the XML file, but it is not declared in the DTD.

    Your subsequent error on the missing items is because you spent in the "topic" DTD, who does not know the dita element or elements based on concepts.

    If you can unpack your files dita element (because you are just using a topic in each file), which can solve the problem. But you probably need to do is open these files in a text editor and remove the attribute of xmlns:ditaarch of them (he not really needs on the elements of the topic either since it is the default value). Then, I turn to the composite 1.1 as a default app. I'll take a look at the FM10 1.2 default app and see what happens. (I have not seen this problem since I was on DITA-FMx, which has its own structure of apps).

    See you soon,.

    .. .Scott

    Scott Prentice

    Leximation, Inc..

    www.leximation.com

Maybe you are looking for