What trouble are you having? Your post doesn't identify what the issue is.
If you want to see what your XML source should be structured like, create a table, add the appropriate data, and export it as XML. Open it in a text editor. Make your output from however the data is generated be like it.
Take care, Mike
Yes, I just missused Ctrl+S, and I posted my question too early. Then I lost the update of my question
I'll have to re-type the whole stuff..
Well, here is a shot version of the question; this is what I get when importing XML:
Item Price Tax percentage VAT Total price Item description $80 20% $20 $100 Item description $80 20% $20 $100 Item description $80 20% $20 $100 Total $80 $20 $100
The XML structure repeats the cells. But, in InDesign, new lines are not generated accordingly: extra cells are added to the last cell of the line...
Yes, the forum software I love to hate...
Hmm, haven't seen a repeat unless the XML data is malformed. And it appears in the screen shot that a table is inserted into a table? (Well, both repeats appear to be tables in tables).
In a new document, I would begin with creating the data as per your first screen shot (if that is how you want the data), export to XML and compare it to a single node in your imported XML. Cause it looks like unclosed or repeated data.
I may have to rephrase my question (those are not screenshots, but attempts to simulate the InDesign rendering ).
The repeat behaviour is expected :
I would like to get this in InDesign:
- Title | Title | Title | Title
- Item 1 | Price 1 | Tax 1 | Total 1
- Item 2 | Price 2 | Tax 2 | Total 2
- Item 3 | Price 3 | Tax 3 | Total 3
But I get this in InDesign after import:
- Title | Title | Title | Title
- Item 1 | Price 1 | Tax 1 | Total 1 | Item 2 | Price 2 | Tax 2 | Total 2 | Item 3 | Price 3 | Tax 3 | Total 3
The XML for this section looks like this :
There is no line distinction in XML. However, if I understood the documentation well, this is the way of doing it. I exported an InDesign table to XML and there is no line distinction either...
Also, I checked my source XML file with an online validator, and no errors were found.
I also tried this :
- Create a several-lines table with InDesign, and filled up
- Export the document to XML
- Delete data in the InDesign table, and delete all lines but one
- Import XML
I get the same error : extra cells are added next to the last one.
Indeed, the last cell has to be widely extended to receive all this data. If not, this alert appears: "Cells too small to be split".
I quickly modified an existing XML I am working on. Try this.
I did not manage to use your structure. InDesign would add a Table>Cell structure, not allowing any intermediate tags.
However, I found a workaround to the described bug.
I would pre-create a large number of lines (more than the expected records of the database, which are supposed to be exported to XML)
Then, at XML import, I delete useless extra elements.
At the end, I get the expected result, with just the required number of lines in the table.
Thanks anyway !
I'm not thinking there is a bug, but rather a communication error between what you write and what I think it means. If you needed a different structure, it would have been good to know exactly how you wish for the import to lay out as.
In the end, glad you worked it out.