|
| [WD21] TableToXML question... |
| Iniciado por guest, 08,ago. 2016 12:42 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 08,agosto 2016 - 12:42 |
Hi guys,
Question regarding TableToXML function; I have a Table Control with data in it and use TableToXML to produce an XML file, and all works well, but how do I change the default "WINDEV_TABLE" & "\WINDEV_TABLE" tags to be what I want them to be (as below - XML gt & lt chars replaced with curly brackets to make it readable)?
I can see where the "ProductsToWebsite" and the individual items come from; they are the name of the Table Control and the column names - all good, but where does "WINDEV_TABLE" come from?
Anyone know how to change this default value or if it's even possible to change it?
{?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?} {WINDEV_TABLE} {ProductsToWebsite} {SKU}9000000001234{/SKU} {Description}Shimano XYZ Jersey{/Description} {LongDescription}Shimano XYZ Jersey (long description){/LongDescription} {Options}Red: L:{/Options} {StockQty}3{/StockQty} {Price}14.99{/Price} {TimeStamp}20160808003306544{/TimeStamp} {Mode}A{/Mode} {/ProductsToWebsite} ... ... ... {\WINDEV_TABLE} |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,agosto 2016 - 14:06 |
Hi Darren
I don't know if it's possible during the process, but afterword, with MyString is string=floadtext(XML file) Mystring=replace(Mystring,"WINDEV_TABLE","Whatever you want") fsavetext(...)
it's clearly very easy
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,agosto 2016 - 14:10 |
Darren,
inTableToExcel the TITLE of the tablecontrol is used. Maybe you have a tablecontrol without a 'table title'? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,agosto 2016 - 15:10 |
Hi,
@Fabrice, yes I could use Replace, I just wanted to confirm I wasn't missing something, but I also want to avoid having to change every file before it goes out.
@Arie, Yes, "ProductsToWebsite" is the table control title... can't see anything in the table control that mentions "WINDEV_TABLE". WD adds "WINDEV_TABLE" to encapsulate all the records in the table control. Looks like it's a hard coded default?
As always, thanks for responding... :spos: |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,agosto 2016 - 09:57 |
| ...and using HExportXML, "HF_DOCUMENT" is output to the XML in place of "WINDEV_TABLE"... |
| |
| |
| | | |
|
| | | | |
| | |
|