XML serialization , validating against multiple schemas

Hi

My web service receives an object of type say MyObject. I want to
serialize this object,and then validate the xml against the main xsd.
When validation happens,
it should also validate against the included schema.

The main schema includes one more schema and the actual types are
described in the included schema.

eg., 
<xs:schema xmlns:t="http://myschemas/base" xmlns="">
<xs:import schemaLocation="base.xsd" />
<xs:element name="MyObject">
<xs:complexType>
  <xs:sequence minOccurs="0">
   <xs:element name="Name" type="t:Name" />
  </xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

t is the namespace of the included schema and has definition for the
element "Name"

1. When I serialize, how do I specify the xsd for the xml?
2. How do I validate against multiple schemas

Regards

rjn



*** Sent via Developersdex http://www.developersdex.com ***
0
rjn (3)
4/1/2005 10:35:21 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
654 Views

Similar Articles

[PageSpeed] 4

Reply:

Similar Artilces:

Catching check/uncheck event accross multiple checkboxes
Hello, in a sheet with a couple dozens of checkboxes I need to be able to catch the event when each checkbox gets check or unchecked; probably the worst scenario would be defining an event handler for each checkbox. I wonder if there is a way for me to catch 'a global' check / uncheck event and only after that decode which checkbox had sent that event....? Hi Mac, I think that best way to handle this is to have a command button called Continue or Next otherwise you will never know when the user has finished making the selections. The user might just make one or two s...

XML Header
Hi, I have some XML doc loaded in a C# Web Service. XmlDocument doc = new XmlDocument(); doc.LoadXml(myDoc); Code Missing to manipulate header (I would like to replace or manupulate all these XXXXX): <mso-XXXXXX productversion="XXXXXX"> <mso-application progid="XXXXX"?> doc.Save(myNewDoc); Any idea on how to access and manipulate data within the doc header? Thanks vbdev vb6dev2003 wrote: > I have some XML doc loaded in a C# Web Service. > XmlDocument doc = new XmlDocument(); > doc.LoadXml(myDoc); > > Code Missing to manipulate header ...

Transaction keeps downloading even after accepted multiple times
I have a checking account which downloads automatically / updates automatically when I start Microsoft. There is one transaction from 11/12/2007 that downloads every time, even though I have accepted it or matched it with a transaction and it still keeps downloading. What do I do? I called the bank and they say it is a Microsoft problem. Please advise. In microsoft.public.money, Connie wrote: >I have a checking account which downloads automatically / updates >automatically when I start Microsoft. There is one transaction from >11/12/2007 that downloads every time, even tho...

Read XHTML into XML
Hi all, I need to read/parse XHTML aspx pages and look for certain tokens and content. How can I use a XmlTextReader for this? If not, any other ideas? Thanks in advance, JA Reyes. Jose Antonio Reyes wrote: > I need to read/parse XHTML aspx pages and look for certain tokens and > content. How can I use a XmlTextReader for this? If not, any other ideas? If the pages are well-formed XHTML then it is possible to use XmlReader (in .NET 2.0/3.0) or XmlTextReader (in .NET 1.x) to parse the XHTML documents. You can also use the other XML APIs .NET provides so using XPathNavigator and/o...

Radiant 1510 with samsung 350 serial printers
good day, Has anyone ever tried using Radiant 1510 Touchscreen moniters with samsung 350 serial printers......I am having some trouble being able to print....i have triend both the opos and windows drivers....any help would be greatly appreciated.... Best regards, Uttam Using a serial printer might be your problem. If you look through past threads you will notice a lot of the problems listed with printers show up with a serial connection. It seems to be much better to use either LPT1 or USB. You might want to consider a Serial to USB adapter and see if that works. Craig "...

Serial port
Hey, I've got an application (VC6), which must communicate with the serial port (com port). I use ReadFile, WriteFile with Non-overlapped mode. There's a thread, which is only for the reading. The problem: Missing data. Does anybody knows, how the input/output buffer of the comport is realizied? When there come more data over the ComPort then the Software reads out, what happens? Does anybody had some advices? Thanks Peter There are a variety of ways to set up reading a commport, but in general you= have to use overlapped IO. The comm port driver in effect puts data in y...

How to invoke the xml editor?
I installed vs2005 on a new xp pro machine, and installed everything except C++. When I click on a file with a ".xml" extension it is opened with IE. When I click file/Edit with XML Editor, it opens it with Notepad. If I click File/Open With and select XML Editor, it opens it with IE. So, where is the xml editor? Can it be invoked from withing VS? Where? Bill * billsahiker@yahoo.com wrote in microsoft.public.dotnet.xml: >I installed vs2005 on a new xp pro machine, and installed everything >except C++. When I click on a file with a ".xml" extension it is >opened ...

CEPC, serial KITL
Can somebody explain to the novice how to enable serial KITL in WinCE 6.0. CEPC ? My CEPC platform has an incompatible Ethernet adapter, so I am booting to MS-DOS copying NK.BIN from the network share and then staring it with loadcepc.exe It works great, I also can see debug messages on serial port. Great, however, what is the easiest way to run KITL over the serial port ? There suppose to be serial KITL implementation in CEPC BSP, but how to enable it ??? Thank you, Yan ...

Multiple appearances of a user
I am trying to get up to speed on CRM to administer it for my company. We have several users including users I added to CRM myself that have multiple appearances in CRM for the same user name, but with different role assignments and all for a single ADUC account. This also eats up extra licenses in CRM. I can't figure out why or how these multiple accounts are being created when I know that I only created a single user account with the Deployment Manager. ...

show XML schema and values
I have an XML document that looks like the following: <record> <Field1>value1</Field1> <Field2>value2</Field2> <Field3>value3</Field3> </record> What I'm aiming to do is to show the data in a report as in the following example: record: Field1 value1 Field2 value2 Field3 value3 The "Field1-3"-elements can have any name, so I'm trying to get a table that has in one result column the element name, and in the second colum...

Validation List not showing external source.
I have a external reference on a Data Validation but the list will not show up unless I have the external reference spreadsheet open. I can manually type in the exact selection and it works fine. Unless I have the refernced spread sheet open, I can not see the list options. Is there a fix for this or is this a limitation on Excel? Any work arounds? David, Did you find the answer? --- Message posted from http://www.ExcelForum.com/ ...

edit multiple values
Hi, I have a price list sheet with item descriptions and pricing. The information is all over, not in straight colums or rows. Is there a way to have excel search out all the cells with $ values and reduce or increase by a specific %. example : Icrease or derease ever cell with a $ value by 20% Hi Eddie, It can be done with a VBA macro, Post Back if you want more. -- Hope this helps! Pat Garard Australia. apgarardATbigpondDOTnetDOTau "Eddie" <123@abc.com> wrote in message news:L0vbb.7310$I36.4654@pd7tw3no... > Hi, I have a price list sheet with item descriptions and p...

problem when transferring out serialized item
we have a serialized item that was returned by a customer, and was placed into offline inventory. i went to offline inventory and transferred the item out, we did a standard transfer type (we are sending the item back to the supplier). after doing that, i went to the transfer out order, and selected issue all, and tried to commit to it. i get the error message "the following serial number exists in the database, and is not available for issuing: 04215494019" i checked this serial number in the serial table, and the status of the serial number is set at 3. we've never...

Offline synch using XML web-services
This is a bit long-winded. Can somebody read thru these 2 use cases, and tell me if it is feasible ? :- Use Case : Replication before Offline Synch Scenario 1 : Oracle Server , MSDE client 1. User clicks on 'Go Offline'. System creates a MSDE SQL database in laptop (client), gets the schemas of the tables in Oracle, creates corresponding tables in client's MSDE SQL (mapping Oracle datatypes to SQL datatypes). 2. Offline replication program reads in the tables of the server into a typed datasets, converts the typed datasets into XML, and stores the XML in the client. (XML serial...

XML Serialization ... how to truncate <?xml...
While xml serializing object how can I truncate <?xml ...?> this line alone? I need to send the serialized xml data to a web method ... since SOAP already have <?xml tag there was some confusion Any help would be greatly appreciated Thank you Regards Raj Raj wrote: > While xml serializing object how can I truncate <?xml ...?> this line alone? Serialize to an XmlWriter created with XmlWriterSettings where you set OmitXmlDeclaration to true. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ ...

Multiple Personal Folders
For some reason, Outlook has decided to duplicate everything. I have multiple copies of the "Outlook Today Personal Folders". Everytime I close a reopen Outlook it adds another complete set of folders. How can I get rid of them? "Stephen" <stevs2@ameritech.net> wrote in message news:025d01c34e6a$dc9fdcb0$a401280a@phx.gbl... > For some reason, Outlook has decided to duplicate > everything. I have multiple copies of the "Outlook Today > Personal Folders". Everytime I close a reopen Outlook it > adds another complete set of folders. How can I g...

error adding new Schema Field 04-21-04
Hi, When I attempt to add a new schema field to the "Lead" object in the Deployment Manager, I get the following error: "An error occured during the addtion of the new field. The addition failed." In the event log, I there are two relevant entries: "dmLog: Failed to add new Picklist attribute (CFPsolution) to Lead entity" and "dmLog: sp_repladdcolumn failed. - Timeout expired" I've previously successfully added a pickup list called "Sector" with 9 values. Therefore I don't think I've exceeded the 8000 char row limit. Apart from...

Import multiple sheet spreadsheet #2
I am importing a single comma delimited text file into Excel 2002 SP3. The final spreadsheet will encompass multiple sheets. What is the delimiter to tell Excel to move on to the next sheet? Thanks for any help. ...

String to xml document
Hi there, I was hoping someone can help me with a little problem I can't seem to find any answers to. I've got a form wich will be posted. On receiving the post I would like to parse a formvar to a xml document. The contents of this formvar (string) will be a valid xhtml document. Can someone give me a startertip (or more :-)) on how to achieve this? tnx in advance, James van der Veen Sjeems wrote: > I was hoping someone can help me with a little problem I can't seem to find > any answers to. > > I've got a form wich will be posted. On receiving the p...

store multiple timestamps in one row on table
Hello, I am trying to create a form that allows an employee to select their name and click a command button to store the time they leave for lunch and another button the time that they return. I have each button coded to be written to a table, but I would like to have the in and out times be stored on the same row so I can have a function subtract the two. Currently, it writes a new row for each click of the button. Any help would be appreciated. On Fri, 8 Feb 2008 12:19:56 -0800 (PST), roostorx@gmail.com wrote: >Hello, > >I am trying to create a form that allows an employee to ...

Excel does not display multiple workbooks on the windows taskbar
Excel does not display multiple workbooks on the windows taskbar even when the "Windows in Taskbar"option is checked Do you use shared workbooks? If so, there's a bug in xl2k that's been fixed in xl2002 that played with that setting. Or maybe... http://support.microsoft.com/default.aspx?scid=kb;en-us;Q215816 OFF2000: Only One Icon Visible in Taskbar When "Windows in Taskbar" Option Is Selected elg wrote: > > Excel does not display multiple workbooks on the windows taskbar even when > the "Windows in Taskbar"option is checked -- ...

Unable to send multiple attachments (.doc + .xlsx)
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange Composed the message and attached the files. Clicked send, and nothing happened. No error message, it just sits there. Tried re-starting Entourage, but problem remains. <br> No problem when sent through web outlook. No problem sending files individually. ...

Beginner of XML
I am a beginner of XML. I want to group some files together with a xml file. (it includes a text file, and an image file and a video file) Can someone show me some guidelines? Please help. ...

Valid xml to read from an xml file?
I'm using vb.net, i get an error at the reader line saying the remote server can't be found. Is the below even valid? dim reader as XmlTextReader reader = new XmlTextReader ("http://www.mysite.com/my.xml") do while (reader.Read()) 'do some action here response.write(reader) loop thanx chumley XmlTextReader uses System.Net.WebRequest under the covers -- see if you can figure out how to create a connection that way. Usually there's some proxy server information missing that you can enable if you use WebRequest directly, and then pass the result of GetResponse()...

Example eConnect XML documents
MSDN says the following: Installing eConnect schema When you include the schemas component of the eConnect install, the installer places schema files in a schemas folder on your computer. The following schema resources are available: The install places the .xsd schema files in the directory c:\Program Files\Microsoft Great Plains\eConnect9\XML Schema\Incoming XSD Individual Schemas. The files in the directory contain the schema for each eConnect XML document. The install places a file named eConnect.xsd that contains the schema definition for all eConnect XML documents. The install typicall...