Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Troubling with generating properly nested xml
Message
From
01/11/2011 16:37:33
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01527786
Message ID:
01527813
Views:
47
Sergey,

It doesn't have to be. It's just that so far I only know how to use xmladapter - this is my first time processing xml besides cursortoxml. I know that I can hand code it if I have to.
I was able to generate it this way and then do a strtran on the PreprintInsert tag, to put the 'upper' fields into the bottom and then execute the xmladapter's fields remove methods on the upper fields to get it to work, but it seems cumbersome.

Also, I guess there are other classes that are available to use - xmldom?

Thanks.



>Why it has to be XmlAdapter? An XML is just a text file that can be easily generated using VFP string manipulation capabilities.
>
>>I am generating the xml given below for a vendor based upon their specs, using the xmladapter, vfp9 sp2.
>>I am using 'set relation code' and 'respect nesting' such that the xml is nested properly. However, in the sample I generated below,
>>the fields notes, publication_code, pagination_code,ad_sold_by, and billing_flag appear immediately after adbasepreprintinfo
>>It seems like in general that vfp wants the data fields that belongs with higher level data to appear above table data that is nested below it. However, the vendor wants the notes, publication_code, pagination_code,ad_sold_by, and billing_flag fields to appear after the ending tag for ordercustomers and before the preprintinsert tag
>>
>>Is there a way to do this with the xmladapter? I guess I could do some postprocessing on the file or memory variable to force it into the right position, but at the moment it seems to me that this would be some tricky coding.
>>
>>Will I have to 'hand code' this?
>>
>>
><snip>
Previous
Reply
Map
View

Click here to load this message in the networking platform