And imagine, this guy probably took the job of 2 US engineers...
On May 18, 2:38 pm, Bob Kerns wrote:
> We have been helping you. Apparently, you are not listening.
>
> You cannot do this. It makes no sense. You cannot insert data into the
> middle of a file, period, ever. That's not what a fil
We have been helping you. Apparently, you are not listening.
You cannot do this. It makes no sense. You cannot insert data into the
middle of a file, period, ever. That's not what a file is.
Databases, on the other hand, support this kind of operation just fine. Use
a database. Insert your da
Well, you can just ask the user to remember his scores. Or you can
use a database. Or you can write some other sort of file.
[Please help save electrons -- don't read this post unless absolutely
necessary.]
On May 17, 9:57 pm, surya tej wrote:
> Dear All ,
>
> is there a alternative way instea
Dear All ,
is there a alternative way instead of rewriting the entire file ?kindly help
me
On Tue, May 17, 2011 at 10:53 AM, Bob Kerns wrote:
> I would use a database for this. Even if it's trivial.
>
> I can't quite figure out the meaning of your XML, or I'd describe the
> schema for you, but
I would use a database for this. Even if it's trivial.
I can't quite figure out the meaning of your XML, or I'd describe the schema
for you, but it will be pretty simple. (In particular, the position of the
Answer element seems strange to me, and the value doesn't seem related to
the question?)
You're not "appending", you're "inserting". You basically will need
to read/write the entire file.
On May 16, 1:07 pm, surya tej wrote:
> Thanks a lot folks..for your response
>
> My XML format is
> ..
>
>
>
>
>
>
>
>
>
>
Thanks a lot folks..for your response
My XML format is
..
A
..
I need this XML file for a test taking application.When the user submits his
exam . i am able
Hmm, I'd probably do it one of two ways depending on how big the xml file is
expected to grow.
If it's relatively small, read it into memory, deserialize it, find the
node/tag where you wish to append your node, append it and then re-serialize
it into the same file. But that's only if it's small.
Another alternative is a journaled approach. Write the updates to a
journal, then merge them with the main file from time to time in a
"batch" processing step.
On May 15, 4:57 pm, Bob Kerns wrote:
> Simple, yes, but it performs as O(n^2). As your file gets longer and longer,
> your application w
Simple, yes, but it performs as O(n^2). As your file gets longer and longer,
your application will perform slower and slower. If you don't take care to
do it off the UI thread, you will eventually start getting force-closes
because it stalls out the UI thread.
Not generally recommended.
All of
Throw away your requirement ("no rewriting of the file") and you have a simple
solution.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this gro
Well, there IS one way, sort of.
You can have one XML file that has the outer tags, with a DTD that defines
and entity that references a second file that contains a sequence of XML
forms, and a reference to that entity between the outer tags.
The need for two files is often reason enough to rej
Can't be done. (Well, could be done, but would require some file
calisthenics. You'd need to scan through the file to find the closing
tag, figure out what record that begins with -- it might actually span
records -- then write your new tags in place of the closing tag and
restore the closing tag
> It would be great if you can give the entire source
> code.
Of course, why don't you just send us your Requirements Docs and will
send you back the entire app for you. Free of charge, of course.
--
You received this message because you are subscribed to the Google
Groups "Android Developers"
14 matches
Mail list logo