Reference C# type within XML schema? -


is possible reference types within c# project in xml schema file? validation , intelli-sense mean...

lets have following:

namespace example {   class mytype   { int test = 0; } } 

how reference example namespace within schema file can use mytype element type?

not directly.

there's sort of 2 ways can though.

the first mark class serializable , use xmlserializer serialize xml. in conjunction this, can use xsd.exe create schema class, , that used type in (other) schema. xmlserializer used serialize , deserialize to/from type.

on related note, if have method want capture in in xml (as opposed data types or structures), can extend xslt c# (or vb.net, or javascript) code. msdn has more documentation on how that, basic idea being use xsltargumentlist , addextensionobject add method. it's possible directly in xslt using msxsl:script (see here more information on that).


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -