Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I construct this xml?
Message
De
17/10/2011 10:22:08
 
 
À
17/10/2011 10:13:13
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01526615
Message ID:
01526616
Vues:
66
I have found that it's often easier to hard code the XML using Scan/Endscan and Text/Endtext.

>I was given the following xml sample and told that we need to provide our partner with an xml file that is setup in the same way. Up until now I only have limited experience with cursortoxml(). It looks to me like I would have to use the xmladapter to get this to work?
>It looks to me like this is 'nested' xml', but I have very limited experience with xml files/syntax.
>Also, the file makes sense to me, mostly, but I don't get why code-a,code-b,sold-by, and billing-flag are positioned in the file where they are?
>
>Can someone confirm that this is a valid / properly laid out xml file, and give me some pointers on how to go about preparing it from vfp9?
>
>thanks
>
>
>
>
><?xml version="1.0"?>
><BaseData>
>	<BaseInfo>
>		<OrderCustomers>
>                  <OrderCustomer>
>				<IsPrimaryOrderer>true</IsPrimaryOrderer>
>				<IsPrimaryPayor>true</IsPrimaryPayor>
>                                <Customer>
>				<Name1>SomeCompany</Name1>
>				 </Customer>
>			</OrderCustomer>
>		</OrderCustomers>
>		<code-a>Y</code-a>
>		<code-b>N</code-b>
>		<sold-by>repcba</sold-by>
>		<billing-flag>N</billing-flag>
>		<OrderDetails>
>			<Sides>1</Sides>
>			<Count>4</Count>
>			<Weight>0.00</Weight>
>			<Type>Tab</Type>
>			<Schedule>
>				<invoice-text>test1</invoice-text>
>				<LocInfo>
>					<book>print1</book>
>					<edition>3</edition>
>					<rundates>
>						<date>10202011</date>
>					</rundates>
>				</LocInfo>
>				<Location>Daily 04</Location>
>				<distribution-code>
>					<dist-code>10304</dist-code>
>					<Delivery-Method Type="Method1">
>						<Selected>true</Selected>
>                                                <Override-Counts>
>                                                   <t-count>700</t-count>
>                                                </Override-Counts>
>					</Delivery-Method>
>				</distribution-code>
>				<distribution-code>
>					<distribution-code-name>10305</distribution-code-name>
>					<Delivery-Method Type="Subscriber">
>						<Selected>true</Selected>
>                                                 <Override-Counts>
>                                                   <t-count>750</t-count>
>                                                </Override-Counts>
>					</Delivery-Method>
>				</distribution-code>
>				<distribution-code>
>					<distribution-code-name>10306-1</distribution-code-name>
>					<Delivery-Method Type="type1">
>						<Selected>true</Selected>
>                                                 <Override-Counts>
>                                                   <t-count>800</t-count>
>                                                </Override-Counts>
>					</Delivery-Method>
>				</distribution-code>
>				<distribution-code>
>					<distribution-code-name>10306-2</distribution-code-name>
>					<Delivery-Method Type="Method1">
>						<Selected>true</Selected>
>                                                <Override-Counts>
>                                                   <t-count>900</t-count>
>                                                </Override-Counts>
>					</Delivery-Method>
>				</distribution-code>
>			</Schedule>
>		</OrderDetails>
>	</BaseInfo>
></BaseData>
>
>
>
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform