Board index » cppbuilder » Is there a way to get my XML data in a database approuce so i can use SQL querys to retrive data from the XML file?

Is there a way to get my XML data in a database approuce so i can use SQL querys to retrive data from the XML file?


2005-07-29 03:55:40 PM
cppbuilder11
Hi ,
First of all thanks for the information I would like to use the
ClientDataSet. I thikt it can solve a great deal of my problems.
I ran into some problems using this road so maybe I should explain more of
the point that i reached and the things I want to atchive.
I'm using the Databynding tool to create a XML converter for me at on place
in a application. The whole structure there is data in memory with objects.
now i want to get the data in a database or use that XML File like a
database. I dont use standard MSXML. I can get my XML into an TXMLDocument
But to change that to a ClientDataSetFormat I need to have transformation
file. To acheve that I have to use the XMLMapper.exe
I load the xsd schemafile to get the job done. I want to use some queries
on my data set.
I have a list of salesman that is a repeating list of a single salesman one
of his attributes is ratings but also a list of top 10 sales with the values
attached to that data. to get this information like selelcting the best 5
top 10 sales for all my salesman. that are the things I want to retreave
from my XML Doument. but i cant get more than i have a list of salesman.
when i try to look into the list I get some information but some is missing
(the first column is only filled for the firts salesman the rest are all
empty.
when i try to select * from salesman it gives me nothing different than when
showing the data in the first place like
keynr Salesman
68 [DATA SET][...]
when I Klik on the [dataset] I get the list of sales man but only the first
one has an Id.
then all othere list are [DATA SET] again. on kliking i get the next data
that works only to steps deep.
and I want to get the data in a different way. I want to sum the items 4
layers deep in the XML but it is 4 layers deep for each item and i want to
sum it over the items. like in the exemple of the salesman.
Regards Jvdn
"Damon Chandler (TeamB)" < XXXX@XXXXX.COM >
schreef in bericht news:42e1d375$ XXXX@XXXXX.COM ...
Quote
Hi Jochanan,
The TClientDataSet component can use data in XML format; see...

bdn.borland.com/article/borcon/files/2106/paper/2106.html
This is a nice article but see above for the results

Good luck,
--
Damon (TeamB)
C++Builder Developer's Journal
bcbjournal.com
BCB Commonly Asked Questions
bcbjournal.com/bcbcaq


Jochanan wrote:
>Hi,
>
>I want to use an XML File as a database. i want to use querys on it with
>using the goupby clausule and SUM etc'.
>Is this posible at all??
>the only thing i can get all the time is the tabel and after dubbel click
>on more specifide data that part only.
>or is it depending on my XML File structure?
>here is an example of hou de layout is of my XML Document:
>Data
>DataDetail
>aa
>/aa
>cc
>bb
>/bb
>bb
>/bb
>bb
>/bb
>bb
>/bb
>/cc
>/DataDetail
>DataDetail
>aa
>/aa
>cc
>bb
>/bb
>bb
>/bb
>bb
>/bb
>bb
>/bb
>/cc
>/DataDetail
>/Data
>
 
 

Re:Is there a way to get my XML data in a database approuce so i can use SQL querys to retrive data from the XML file?

Hi Jvdn,
I'm certainly no expert when it comes to databases, but my first
guess is that your converted data are in still in an incorrect format.
Bob Swart is currently covering TClientDataSet for the BCB Journal, and
I've made his article and code available online for you here...
bcbjournal.com/free_issue/vol9_num7.3.htm
bcbjournal.com/free_issue/bcbj_code_vol9_num7_swart.zip
Hopefully this will provide some guidance; in particular, compare your
converted XML files with the XML files that he provides with his source
code. (Bob is creating a CD/DVD database application that keeps track
of borrowed CDs and DVDs.)
Hope this helps,
C++Builder Developer's Journal
bcbjournal.com
BCB Commonly Asked Questions
bcbjournal.com/bcbcaq
Jochanan wrote:
Quote
I ran into some problems using this road so maybe I should explain more of
the point that i reached and the things I want to atchive.
 

Re:Is there a way to get my XML data in a database approuce so i can use SQL querys to retrive data from the XML file?

Hi Chandler Damon,
Thanks,
in a fast look over the article it look like it is pointing the rigt way for
me.
Thanks again
Jvdn.
"Damon Chandler (TeamB)" < XXXX@XXXXX.COM >
schreef in bericht news:42ea5200$ XXXX@XXXXX.COM ...
Quote
Hi Jvdn,
I'm certainly no expert when it comes to databases, but my first guess
is that your converted data are in still in an incorrect format. Bob Swart
is currently covering TClientDataSet for the BCB Journal, and I've made
his article and code available online for you here...

bcbjournal.com/free_issue/vol9_num7.3.htm
bcbjournal.com/free_issue/bcbj_code_vol9_num7_swart.zip

Hopefully this will provide some guidance; in particular, compare your
converted XML files with the XML files that he provides with his source
code. (Bob is creating a CD/DVD database application that keeps track of
borrowed CDs and DVDs.)

Hope this helps,
--
Damon (TeamB)

C++Builder Developer's Journal
bcbjournal.com
BCB Commonly Asked Questions
bcbjournal.com/bcbcaq


Jochanan wrote:
>I ran into some problems using this road so maybe I should explain more
>of
>the point that i reached and the things I want to atchive.
 

{smallsort}