Board index » delphi » ClientDataset and Mybase XML tables (XML type)

ClientDataset and Mybase XML tables (XML type)

ClientDataset and Mybase XML tables (XML type)

Hi,

I friend has a problem and I made some tests and it really happens...
I'm using delphi 6, and the problem happened when I try to use ClientDataset
with MyBase XML tables in a little application. When I create the dataset
and save the XML file, the component generate a XML file using a XML format
like this:

<ROW RowState="4" ReciboID="1" Usuario="Tarcsio"
Codigo="KTRH-DECB-24406-KINIX" Prestacao="1" Aplicativo="Censo"
Versao="1999" Tipo="1" Vencimento="19990905" Prestacoes="1"
DataMinima="19990830" Gratuitos="10" />
<ROW RowState="4" ReciboID="2" Usuario="COOPRASE"
Codigo="KMHX-KTFT-31781-KIHTH" Prestacao="1" Aplicativo="IMF Nativas"
Versao="1999" Tipo="1" Vencimento="19990909" Prestacoes="1"
DataMinima="19990909" Gratuitos="10" />

Everithing works fine... so, I made changes in application to use MIDASLIB
(in the uses clause) and compile the application without packages. So, it
just stop to work.

Now, if I open the XML file, I have a diferent file using another XML
format. I don't know why, but the application just change the XML format of
the older file to something like this:

- <ROW>
    RowState="4"
    <ReciboID>1</ReciboID>
    <Usuario>Tarcsio</Usuario>
    <Codigo>KTRH-DECB-24406-KINIX</Codigo>
    <Prestacao>1</Prestacao>
    <Aplicativo>Censo</Aplicativo>
    <Versao>1999</Versao>
    <Tipo>1</Tipo>
    <Vencimento>19990905</Vencimento>
    <Prestacoes>1</Prestacoes>
    <DataMinima>19990830</DataMinima>
    <Gratuitos>10</Gratuitos>
    </ROW>
- <ROW>
    RowState="4"
    <ReciboID>3</ReciboID>
    <Usuario>COOPRASE</Usuario>
    <Codigo>KMHX-DMBE-3027-GNRT</Codigo>
    <Prestacao>1</Prestacao>
    <Aplicativo>Censo</Aplicativo>
    <Versao>1999</Versao>
    <Tipo>1</Tipo>
    <Vencimento>19990909</Vencimento>
    <Prestacoes>1</Prestacoes>
    <DataMinima>19990909</DataMinima>
    <Gratuitos>10</Gratuitos>
    </ROW>

So, my questions:

1) How can I change the format of new file to older format?
2) This changes (Midaslib...) is the cause of problems? Another possible
cause?
3) I couldn't find any kind of document or an article that explain the
problem.

Thanks for any help,

[]'s

BETO.

 

Re:ClientDataset and Mybase XML tables (XML type)


Quote
Roberto Capra Neto wrote:
> 1) How can I change the format of new file to older format?
> 2) This changes (Midaslib...) is the cause of problems? Another possible
> cause?
> 3) I couldn't find any kind of document or an article that explain the
> problem.

Im very interested in this topic. Why no responses?

In b.p.xml there are no responses to this... :-(

Re:ClientDataset and Mybase XML tables (XML type)


Quote
Clvis Valadares Junior wrote:

> Roberto Capra Neto wrote:

> > 1) How can I change the format of new file to older format?
> > 2) This changes (Midaslib...) is the cause of problems? Another possible
> > cause?
> > 3) I couldn't find any kind of document or an article that explain the
> > problem.

> Im very interested in this topic. Why no responses?

Because instead of asking in the datasnap group which would be appropriate for
these technical questions he chooses to ask in the non technical group?

Quote

> In b.p.xml there are no responses to this... :-(

I wouldn't expect them since he is asking about changes to CDS and that has its
own newsgroup which would be the most appropriate.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Maybe it was infatuation or the thrill of the chase.
Maybe you were always beyond my reach and my heart was playing safe.
But was that love in your eye I saw or the reflection of mine?
Give me time, won't you give me that time!
Welcome back to the circus.            (Fish)

Re:ClientDataset and Mybase XML tables (XML type)


I asked the same question two months ago:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=3...

or search for "edington which xml is correct" (my post, his answer).

Rod

Re:ClientDataset and Mybase XML tables (XML type)


Quote
Rod wrote:
> I asked the same question two months ago:

> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=3...

> or search for "edington which xml is correct" (my post, his answer).

Thanks.

There are a easy way to convert from format

<row>
   <field>some data</field>
</row>

to format

<row field="some data" />

???

I really really need to convert a file.

Re:ClientDataset and Mybase XML tables (XML type)


Well, at the risk of looking desperately low-tech, it strikes me that a
simple find and replace would do the trick. You could even get away with it
in any old word processor, if you wanted.

Replace '<row>+CRLF' with '<row'
Replace 'CRLF+</row>' with ''
Replace '<field>' with ' field="'
Replace '</field>' with ' />'

Is this too simplistic?

"Clvis Valadares Junior"

Quote
> There are a easy way to convert from format

> <row>
>    <field>some data</field>
> </row>

> to format

> <row field="some data" />

> ???

> I really really need to convert a file.

Re:ClientDataset and Mybase XML tables (XML type)


Quote
Charles Line wrote:
> Well, at the risk of looking desperately low-tech, it strikes me that a
> simple find and replace would do the trick. You could even get away with it
> in any old word processor, if you wanted.

> Replace '<row>+CRLF' with '<row'
> Replace 'CRLF+</row>' with ''
> Replace '<field>' with ' field="'
> Replace '</field>' with ' />'

> Is this too simplistic?

I'll try, thanks.
This is not in the help, btw. :-)

Other Threads