Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generate xml files
Message
From
17/10/2002 11:11:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/10/2002 11:05:32
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00712341
Message ID:
00712368
Views:
7
><?xml version="1.0"?>
><xdoc>
><Schema name="Schema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
>   <ElementType name="testa" content="eltOnly" model="closed" order="many">
>		<element type="row" />
>	</ElementType>
>	<ElementType name="row" content="eltOnly" model="closed" order="many">
>		<element type="campo1"/>
>		<element type="campo2"/>
>	</ElementType>
>	<ElementType name="campo1" content="textOnly" model="closed" dt:type="string">
>		<AttributeType name="type"/>
>		<attribute type="type" default="string"/>
>		<AttributeType name="size"/>
>		<attribute type="size" default="10"/>
>	</ElementType>
>	<ElementType name="campo2" content="textOnly" model="closed" dt:type="string">
>		<AttributeType name="type"/>
>		<attribute type="type" default="string"/>
>		<AttributeType name="size"/>
>		<attribute type="size" default="10"/>
>	</ElementType>
></Schema>
><testa xmlns="x-schema:#Schema">
>	<row>
>		<campo1>aaaaaa</campo1>
>		<campo2>bbbbbbb</campo2>
>	</row>
>	<row>
>		<campo1>dddddd</campo1>
>		<campo2>dddddddd</campo2>
>	</row>
></testa>
>
></xdoc>
>
>
>this is what i get
>
>
>
>
>...and this is what i want
>
>
><?xml version="1.0"?>
><xdoc>
><Schema name="Schema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
>   <ElementType name="testa" content="eltOnly" model="closed" order="many">
>		<element type="row" />
>	</ElementType>
>	<ElementType name="row" content="eltOnly" model="closed" order="many">
>		<element type="campo1"/>
>		<element type="campo2"/>
>	</ElementType>
>	<ElementType name="campo1" content="textOnly" model="closed" dt:type="string">
>		<AttributeType name="type"/>
>		<attribute type="type" default="string"/>
>		<AttributeType name="size"/>
>		<attribute type="size" default="10"/>
>	</ElementType>
>	<ElementType name="campo2" content="textOnly" model="closed" dt:type="string">
>		<AttributeType name="type"/>
>		<attribute type="type" default="string"/>
>		<AttributeType name="size"/>
>		<attribute type="size" default="10"/>
>	</ElementType>
></Schema>
><testa xmlns="x-schema:#Schema">
>	<row>
>              <folder>      <-----------------------
>		<campo1>aaaaaa</campo1>
>		<campo2>bbbbbbb</campo2>
>
>               </folder>     <---------------------------
>	</row>
>	<row>
>		<campo1>dddddd</campo1>
>		<campo2>dddddddd</campo2>
>	</row>
></testa>
>
></xdoc>
But this makes a hierarchy and VFP doesn't support hierarchy at least in VFP7.
You could process the generated XML replacing < row > with < row > +chr(13)+ < folder > (and closing tag).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform