Vector<EgCommon> vClient = new Vector<EgCommon>();
for (int temp = 0; temp < getNodes().getLength(); temp++) {
Node nNode = getNodes().item(temp);
if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element) nNode;
Client cl = new Client(
Util.getTagValue("clientID",
element),
Util.getTagValue("clientName",
element),
Util.getTagValue("routeName",
element),
Util.getTagValue("visitingFrequency", element),
Util.getTagValue("creditLimit",
element),
Util.getTagValue("outletType",
element),
Util.getTagValue("shopGrade",
element),
Util.getTagValue("creditPeriodDays", element),
Util.getTagValue("streetNumber", element),
Util.getTagValue("streetName",
element),
Util.getTagValue("city",
element),
Util.getTagValue("district",
element),
Util.getTagValue("csrId",
element),
Util.getTagValue("comments",
element),
Util.getTagValue("active",
element));
vClient.add(cl);
}
}
return vClient;
}
On 9/14/11, skink <[email protected]> wrote:
>
>
> On Sep 14, 11:29 am, Bishan <[email protected]> wrote:
>> currently i'm reading XML file and put data into a Vector Object. but
>> i don't know how could i insert the data in that Vector Object into
>> sqlite database. this is the point where i stuck.
>>
>> On 9/14/11, skink <[email protected]> wrote:
>>
>>
>>
>>
>>
>> > Bishan wrote:
>> >> k. i got it skink.
>>
>> >> i know how to read XML. but the problem is how could i insert the data
>> >> in XML to the my sqlite database table after reading the XML. that's
>> >> the point whats wrong with me.
>>
>> >> On 9/14/11, skink <[email protected]> wrote:
>>
>> >> > On Sep 14, 9:31 am, Bishan <[email protected]> wrote:
>> >> >> any other answers ?
>>
>> >> >> On 9/14/11, Bishan <[email protected]> wrote:
>>
>> >> >> > thanx skink. i'll try this. :)
>>
>> >> >> > On Wed, Sep 14, 2011 at 12:33 PM, skink <[email protected]> wrote:
>>
>> >> >> >> On Sep 14, 8:49 am, Bishan <[email protected]> wrote:
>> >> >> >> > i have a xml file.(pls see attachement). and i need insert data
>> >> >> >> > in
>> >> >> >> > my
>> >> >> >> > xml file to a sqlite database in my android project.
>>
>> >> >> >> > hw can i do this ?
>>
>> >> >> >> > Client.xml
>> >> >> >> > 18KViewDownload
>>
>> >> >> >> See
>> >> >> >>http://groups.google.com/group/android-developers/browse_thread/threa...
>>
>> >> >> >> Skip the step about TextView and read something how to use sqlite
>> >> >> >> in
>> >> >> >> android app
>>
>> >> >> >> pskink
>>
>> >> >> >> --
>> >> >> >> You received this message because you are subscribed to the
>> >> >> >> Google
>> >> >> >> Groups "Android Developers" group.
>> >> >> >> To post to this group, send email to
>> >> >> >> [email protected]
>> >> >> >> To unsubscribe from this group, send email to
>> >> >> >> [email protected]
>> >> >> >> For more options, visit this group at
>> >> >> >>http://groups.google.com/group/android-developers?hl=en
>>
>> >> > nope. nobody is gonna do your homework and post full working code
>> >> > unless you show what you have done so far and ask whats wrong in your
>> >> > code.
>>
>> >> > pskink
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "Android Developers" group.
>> >> > To post to this group, send email to
>> >> > [email protected]
>> >> > To unsubscribe from this group, send email to
>> >> > [email protected]
>> >> > For more options, visit this group at
>> >> >http://groups.google.com/group/android-developers?hl=en
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>
> And your code is...?
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en