473,698 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Schema (XSD) type <-> .NET Framework type

How can i get the text of the System.Type e.g. "base64Bina ry" from the .Net
type "byte[]"
I can not found any Function to give back this Schematype as string.

thx for your help
Nov 15 '05 #1
1 3169

Hi Mike,

You can get the mapping between the XML Schema (XSD) type and .Net
Framework type in the link below:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpcondatatypesu pportbetweenxsd typesnetframewo rktypes.asp

In the mapping table in the link, you can see that there may be the same
..Net Framework type but maps with multi XML Schema (XSD) type (Such as
hexBinary and base64Binary both map with System.Byte[]). So what you want
is not a single-mapping.

However, there is XmlSchemaDataty pe.ValueType property which can get the
..NET Framework type for the specified XML Schema definition language (XSD)
type.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Mike Strieder" <x@x.com>
| Subject: XML Schema (XSD) type <-> .NET Framework type
| Date: Sat, 18 Oct 2003 17:44:18 +0200
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <ek************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: line-g-15.adsl-dynamic.inode.a t 62.99.226.15
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1923 20
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| How can i get the text of the System.Type e.g. "base64Bina ry" from the
..Net
| type "byte[]"
| I can not found any Function to give back this Schematype as string.
|
| thx for your help
|
|
|

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4589
by: Victor Engmark | last post by:
I am making an XML Schema for emails, and would like to specify that any elements from the XHTML2 namespace are allowed in the body/contents and signature/footer parts of the message (and _only_ there). I guess I have to use some combination of the xsd:import and xsd:any elements, but I'm not sure of the syntax. What should I fill into the following structure and/or the top of the file? <?xml version="1.0"?> <xsd:schema...
2
3864
by: maddalimurali | last post by:
Hello all, My xml and schema file header are as follows. 1) cisGlobals.xsd. <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://www.talgov.com/cisGlobals" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cisGlobals="http://www.talgov.com/cisGlobals" elementFormDefault="unqualified">
2
3349
by: BillD | last post by:
I'm trying to derive a schema from a base schema. I want to redefine a "group" from the base schema in my derived schema in order to add more options to the "choice" aggregate (see schema1.xsd sample). schema1.xsd sample: <!-- Here is a clipped down version of the group I want to redefine. --> <xsd:group name="INSURANCESVCRQMSGS"> <xsd:choice> <xsd:element ref="HomePolicyAddRq" minOccurs="1" maxOccurs="1"/>
2
4771
by: pohmart | last post by:
I am using Xerces 2.6.2 and SAX on Windows2k. I want to validate an XML doc, which has no schema reference, with an external schema which is on my PC. I am setting the following properties and features: saxParser.setFeature("http://xml.org/sax/features/namespaces", true); saxParser.setFeature("http://xml.org/sax/features/namespace-prefixes", true); saxParser.setFeature("http://xml.org/sax/features/validation", true);...
2
2490
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the target namespace of the components from the included schema document. I'm confused because of the rules I read in the XML Schema spec <http://www.w3.org/TR/xmlschema-1/#element-element>: > If the <element> element information item has <schema>...
3
5916
by: Davide Bedin | last post by:
I have a "library" schema with the simple and complex types I commonly use in other schemas and then several other schemas, maybe created by other developers, that import/include the library schema. And then other schemas can extend it..... The classes created by XSD really help to make the development faster and easier. I really would like to use XSD.exe tool as much as possible and to avoid editing the classes defined by the tool. ...
2
10755
by: Vagabond Software | last post by:
I have translated a DTD to an XML Schema (XSD) file by hand, and the Schema View in Visual Studio .NET 2003 seems to diplay everything properly. However, when I specify the schemalocation in my xml files, VS.NET still reports that no schema could be located. Here are the relevant (maybe) portions of the files: FROM THE SCHEMA FILE (mydoc-v2.xsd) <?xml version="1.0" encoding="utf-8" ?> <xs:schema...
6
4431
by: LesleyW | last post by:
Hi Apologies if this is a really dumb question, but being new to XML and Schemas, I wonder if giving the namespace for eg xsd or xsi as a website address means that the user has to be online when they run the app? If so, what should I do if I can't guarantee that they will be? Can I bring all these files into the app? Is that desirable? I'm about to write an app that takes an XML file as input, using Visual Studio 2005 Express and SQL...
10
6932
by: gmocnik | last post by:
I am validating XML files on a server which has no internet access and the validadation in C# does not work. Schema with which I am validating has namespaces like: xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#". I have these schemas all locally on the disk, but it does not work. If I try on a computer with internet access then it works just fine. Does someone know what to do. Function with...
1
2809
by: Ingo Siebert | last post by:
Hi, is it possible to have more than one schema in one file defined? Is something like the code below possible? <xsd:schemas> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... > <xsd:element name="execute"... </xsd:schema>
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9023
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7721
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.