Sign In
Dave Glover "Down Under (Oz)"
Webdev, Visual Studio, Mobility, Windows, Security, Media Center and Gadgets:-)
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Blog Home
About
Email Blog Author
Share this
RSS for posts
Atom
RSS for comments
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
ASP.NET
ASP.NET Editorial
Australia
Community
Design
Humour
MapPoint
Media Center
Media Center 2005
Mobility Dev
Office
Pages
PDC09
Powershell
Security
Services
Silverlight
SQL Server
Virtual PC/Server
Visual Studio
Windows 7
Windows Azure
Windows Phone
Windows Vista
WinFX
Archive
Archives
February 2012
(1)
January 2012
(2)
November 2011
(2)
October 2011
(2)
September 2011
(5)
August 2011
(1)
May 2011
(1)
April 2011
(2)
March 2011
(1)
December 2010
(1)
September 2010
(5)
July 2010
(1)
June 2010
(1)
April 2010
(1)
January 2010
(2)
October 2009
(4)
September 2009
(3)
August 2009
(4)
July 2009
(2)
June 2009
(6)
May 2009
(11)
April 2009
(4)
March 2009
(6)
February 2009
(8)
January 2009
(6)
December 2008
(5)
November 2008
(1)
October 2008
(3)
September 2008
(4)
August 2008
(1)
July 2008
(3)
June 2008
(1)
May 2008
(5)
April 2008
(1)
March 2008
(3)
January 2008
(3)
November 2007
(4)
October 2007
(5)
September 2007
(2)
August 2007
(6)
July 2007
(3)
June 2007
(3)
May 2007
(1)
April 2007
(2)
March 2007
(4)
February 2007
(1)
January 2007
(6)
December 2006
(4)
November 2006
(6)
September 2006
(5)
August 2006
(5)
July 2006
(5)
June 2006
(3)
May 2006
(4)
April 2006
(4)
March 2006
(7)
February 2006
(8)
December 2005
(11)
November 2005
(5)
October 2005
(16)
September 2005
(15)
August 2005
(7)
July 2005
(11)
June 2005
(7)
May 2005
(2)
April 2005
(3)
March 2005
(18)
February 2005
(4)
January 2005
(5)
Convert It 2.2+ XML Schema Definitions
MSDN Blogs
>
Dave Glover "Down Under (Oz)"
>
Convert It 2.2+ XML Schema Definitions
Convert It 2.2+ XML Schema Definitions
Dave Glover
16 Oct 2005 9:20 PM
Comments
0
Catalogue.XML
Four Conversion Types are supported
Measures
: General Linear Conversions eg 1inch = 2.5 CMs etc
Currency
: Currency Definitions. Categories of type "Currency" can be updated via the Currency Rate Web Service provided free of charge by
http://www.webservicex.net
. For valid Currency Symbols see
www.xe.com
- the 3 Character Symbols (eg GBP = United Kingdom Pounds) is a great list of valid currency symbols
StockQuote
: Catgories of this type can be updated via the Stock Quote Web Service provided free of charge by
http://www.webservicex.net
.
Temperature
: For the moment this category is used for Celsius <-> Fahrenheit and it's the only conversion supported and is hard coded as it requires a constant and for the moment the XML definition doesn't cater for this:-)
Categories Element Attributes.
Default
: Sets the default Conversion Category on application Startup
CategoryCount
: Must Equal the number of Category Elements defined in the document
<?
xml
version
=
"
1.0
"
encoding
=
"
utf-8
"
?>
<
Categories
Default
=
"
6
"
CategoryCount
=
"
12
"
>
<
Category
DisplayName
=
"
Angles
"
FileName
=
"
Angle
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
Computer
"
FileName
=
"
Computer
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
Length
"
FileName
=
"
Length
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
Speed
"
FileName
=
"
Speed
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
Weight Common
"
FileName
=
"
WeightAvoir
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
Weight Troy
"
FileName
=
"
WeightTroy
"
Type
=
"
Measures
"
/>
<
Category
DisplayName
=
"
My Currencies
"
FileName
=
"
CurrencyMy
"
Type
=
"
Currency
"
/>
<
Category
DisplayName
=
"
Common Currencies
"
FileName
=
"
Currency
"
Type
=
"
Currency
"
/>
<
Category
DisplayName
=
"
All Currencies
"
FileName
=
"
CurrencyAll
"
Type
=
"
Currency
"
/>
<
Category
DisplayName
=
"
My Stocks
"
FileName
=
"
StocksMy
"
Type
=
"
StockQuote
"
/>
<
Category
DisplayName
=
"
Interesting Stocks
"
FileName
=
"
StocksInterest
"
Type
=
"
StockQuote
"
/>
<
Category
DisplayName
=
"
Temperature
"
FileName
=
"
Temperature
"
Type
=
"
Temperature
"
/>
</
Categories
>
Category Definitions
XML Definition is as follows:
The first Element name must match the filename without the .XML Extension
First Element Attributes
BaseReference
: Defines the Base Reference for the conversion category
ItemCount
: Must match the number of items in the category
DefaultItem
: (optional: default="0") what is the default startup item for the category
DataDate
: (optional) used for Currency and StockQuote types to store the date the data was last updated
Format
: (optional: default="n6") Any valid .NET string format characters eg n2 = number with 2 decimal points
Description
: (optional) Displayed when a category selected and no value entered. If not defined then the description name defaults to the name defined for the first element in the category
Item Element Attributes
Name
: The name of the Category Item
Value
: Ratio relative to the Category
BaseReference
Example Category Files
Length.XML
<?
xml
version
=
"
1.0
"
?>
<!--
All conversion ratios must be relative to the BaseReference element
-->
<!--
eg 1 Grams (BaseReference), 1000 Grams in a Kilo, 28.3495231 grams in a Ounce
-->
<!--
ItemCount = total number of item elements inc the BaseReference element
-->
<
Length
BaseReference
=
"
0
"
ItemCount
=
"
12
"
Format
=
"
n4
"
Description
=
"
Length Measurements
"
>
<
Item
Name
=
"
Centimeters
"
Value
=
"
1
"
/>
<
Item
Name
=
"
Millimeters
"
Value
=
"
0.1
"
/>
<
Item
Name
=
"
Meters
"
Value
=
"
100
"
/>
<
Item
Name
=
"
Kilometers
"
Value
=
"
100000
"
/>
<
Item
Name
=
"
Inches
"
Value
=
"
2.54
"
/>
<
Item
Name
=
"
Feet
"
Value
=
"
30.48
"
/>
<
Item
Name
=
"
Yards
"
Value
=
"
91.44
"
/>
<
Item
Name
=
"
Rod:Pole:Perch
"
Value
=
"
502.9
"
/>
<
Item
Name
=
"
Miles:Statute
"
Value
=
"
160934.4
"
/>
<
Item
Name
=
"
Fathom
"
Value
=
"
182.9
"
/>
<
Item
Name
=
"
Cable
"
Value
=
"
18531.9
"
/>
<
Item
Name
=
"
Nautical Mile:International
"
Value
=
"
185200
"
/>
</
Length
>
CurrencyMY.XML
<?
xml
version
=
"
1.0
"
?>
<
CurrencyMy
BaseReference
=
"
1
"
ItemCount
=
"
8
"
DefaultItem
=
"
0
"
DataDate
=
"
10/14/2005 22:20:38
"
Format
=
"
n4
"
Description
=
"
Frequently Used Currencies
"
>
<
Item
Name
=
"
USD
"
Value
=
"
0.8335
"
/>
<
Item
Name
=
"
EUR
"
Value
=
"
1
"
/>
<
Item
Name
=
"
GBP
"
Value
=
"
1.4591
"
/>
<
Item
Name
=
"
AUD
"
Value
=
"
0.6259
"
/>
<
Item
Name
=
"
CHF
"
Value
=
"
0.6448
"
/>
<
Item
Name
=
"
PHP
"
Value
=
"
0.0149
"
/>
<
Item
Name
=
"
PLN
"
Value
=
"
0.2542
"
/>
<
Item
Name
=
"
HKD
"
Value
=
"
0.1075
"
/>
</
CurrencyMy
>
StocksMy.XML
<?
xml
version
=
"
1.0
"
?>
<
StocksMy
BaseReference
=
"
0
"
ItemCount
=
"
7
"
DefaultItem
=
"
0
"
DataDate
=
"
10/12/2005 23:52:40
"
Format
=
"
n4
"
Description
=
"
My Portfolio
"
>
<
Item
Name
=
"
Show-All
"
Value
=
"
0
"
/>
<
Item
Name
=
"
MSFT
"
Value
=
"
24.52
"
Info
=
"
O:24.41, H:24.55, V:3163640, PC:+0.45%,
"
/>
<
Item
Name
=
"
IBM
"
Value
=
"
82.5
"
Info
=
"
O:82.75, H:82.75, V:179000, PC:-0.83%,
"
/>
<
Item
Name
=
"
SUNW
"
Value
=
"
3.97
"
Info
=
"
O:3.98, H:3.993, V:975188, PC:-0.75%,
"
/>
<
Item
Name
=
"
NOVL
"
Value
=
"
7.17
"
Info
=
"
O:7.11, H:7.18, V:73719, PC:+0.14%,
"
/>
<
Item
Name
=
"
BT
"
Value
=
"
38.38
"
Info
=
"
O:38.38, H:38.38, V:1100, PC:0.00%,
"
/>
<
Item
Name
=
"
NAB
"
Value
=
"
120.5
"
Info
=
"
O:N/A, H:N/A, V:0, PC:0.00%,
"
/>
</
StocksMy
>
Temperature.XML
<?
xml
version
=
"
1.0
"
?>
<
Temperature
BaseReference
=
"
0
"
ItemCount
=
"
2
"
Format
=
"
n2
"
>
<
Item
Name
=
"
Celsius
"
Value
=
"
0
"
/>
<
Item
Name
=
"
Fahrenheit
"
Value
=
"
0
"
/>
</
Temperature
>
0 Comments
Pages
Blog - Comment List MSDN TechNet
Comments
Loading...