There's an example in wwXML-ObjectToXML showing how to create an object with an array property to store the lines but the example is only for the one invoice. I could work out how to apply this but couldn't see how to make it work for the file to contain more than one invoice.
It's now been suggested to me that I could create one file for each invoice and the concatenate them together at the end.
This would be fine but unfortunately I've just had another spanner thrown into the works.
The reason I'm doing this is to provide another company with details of our customers. They have provided me with a DTD showing the details they require but they have just informed me that the attribute and element names must match their's exactly. The sample XML file they have provided contains the same element name within the hierarchy eg a customer could have up to 3 different addresses, the element name being 'addresstype' but with the attribute 'type' set to different values.
It doesn't look as though the routines I've been hoping to use can accomodate this so I think I'll have to reosrt to coding it longhand using text/endtext.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement