Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Newbie - question about loadXML


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-11-2007, 07:49 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default Newbie - question about loadXML

Hi to all,

After having bought basic4PPC some years ago, I have at the end some time to play with it. My first project is normally very simple: I try to write a small PPC application that would allow me to view the XML output of my actions in the GettingThingsDone software called ThinkingRock.

It can export in the XML format and the output looks like the following:

<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<desc>Call YYY</desc>
<context-desc>None</context-desc>
<topic-desc>Recherche</topic-desc>
<project-desc>Project XXX</project-desc>
<action-date>sam. 10 nov. 2007 00:00:00</action-date>
</action>
</actions>

When I try to load this file to a table, doing

file = OpenDialog1.File
Table1.LoadXML (file)

I get an error ath the line LaodXML telling me it is impossible to find table 0

What am I doing wrong? What are the constraints about the XML files that can be load to the table control? I cannot find anything on this point in the help file, neither in the table sample written by Erel. I am rather lost...

Precisions: I try this code on the desktop. The error appears after having chosen the xml file in the open file dialog.

Thank you very much in advance for your help.

Murat

Murat
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)

Last edited by yildi : 11-11-2007 at 07:54 PM.
Reply With Quote
  #2 (permalink)  
Old 11-11-2007, 07:53 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

Table.LoadXML expects a specific xml formated data.
In your case you shouldn't use it.
You should read the text data and parse it.
Can you upload the data (or part of the data)?
Reply With Quote
  #3 (permalink)  
Old 11-11-2007, 08:01 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

Thank you very much Erel for this very quick reaction. Where can I find more information about the format of the file expected by this function?

PS. I have sent you my file by email.

Regards,
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #4 (permalink)  
Old 11-11-2007, 08:07 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

The data file only contains <action> elements like in the attached example. I had to name the file with the extension .txt (instead of .xml) in order to be able to upload it.

Murat
Attached Files
File Type: txt actions.txt (486 Bytes, 16 views)
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #5 (permalink)  
Old 11-11-2007, 10:35 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

I have been able to partially solve my problem usning the CSV export from ThinkRock. But I would really like to now more about the format of the XML files that can be used by Basic4PPC. I attach the very simple program that I have built. Please be indulgent since this is my first prog with Basic4PPC :-)

The exe is for the PPC. There is no installer for now.

EDIT: I have updated the zip file.
Attached Files
File Type: zip trppc.zip (54.8 KB, 12 views)
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)

Last edited by yildi : 11-12-2007 at 12:30 AM.
Reply With Quote
  #6 (permalink)  
Old 11-12-2007, 12:27 AM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

I continue my explorations... ;-)
Now that I am able to import a CSV file, I have been able to save the Table in XML and I can see that the required structure of the XML is much more intricate than the one generated by ThinkingRock. Il will hence limit myself to CSV for transfering files between these two programs. It works quite nicely. I am happy because I have learned a lot of things even with this very simple program (but I know that I have yet a lot to learn...).

Regards,
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)

Last edited by yildi : 11-12-2007 at 11:38 PM.
Reply With Quote
  #7 (permalink)  
Old 11-12-2007, 11:43 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

New version of this proggie (see the screenshots and the zip file).

ThinkingRock is a Java freeware that allows you to easily use David Allen's Getting things done time management methodology.
Attached Images
File Type: jpg screenshot1.jpg (22.2 KB, 16 views)
File Type: jpg screenshot2.jpg (23.3 KB, 15 views)
File Type: jpg screenshot3.jpg (28.8 KB, 8 views)
File Type: jpg screenshot4.jpg (29.0 KB, 8 views)
Attached Files
File Type: zip trppc.zip (58.0 KB, 13 views)
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question Stevenator65 Questions & Help Needed 9 05-30-2008 08:53 PM
SQLite external library newbie question JamesC Questions & Help Needed 2 05-29-2008 03:48 AM
Newbie question - arrays and tables BjornF Questions & Help Needed 3 05-15-2008 09:29 AM
Another newbie question: How to refere to the active form? yildi Questions & Help Needed 2 11-17-2007 07:55 PM
Newbie questions stratus Questions & Help Needed 2 11-13-2007 01:21 PM


All times are GMT. The time now is 10:18 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0