Schema Question

Hi,

I am fairly new to XML schemas and why to use them.  I am integrating with 
another application via xml.  My questions are schemas only good to validate 
the XML documents or can I use the schema to help me parse the xml document?

Thanks 


0
randy
8/29/2006 3:03:11 AM
dotnet.xml 7266 articles. 0 followers. Follow

5 Replies
688 Views

Similar Articles

[PageSpeed] 1

Well, following link will be useful to you.
     http://www.w3schools.com/schema/schema_why.asp


~ Ankit
http://ankitjain.info/ankit/2006/07/01/forcing-download-on-web-page


randy wrote:

> Hi,
>
> I am fairly new to XML schemas and why to use them.  I am integrating with
> another application via xml.  My questions are schemas only good to validate
> the XML documents or can I use the schema to help me parse the xml document?
> 
> Thanks

0
8/29/2006 11:35:08 AM

randy wrote:


> I am fairly new to XML schemas and why to use them.  I am integrating with 
> another application via xml.  My questions are schemas only good to validate 
> the XML documents or can I use the schema to help me parse the xml document?

Well you can generally parse an XML document without validating or 
having a schema.

On the other hand schemas are by now often used to map XML to classes in 
a framework (e.g. .NET framework) or programming language (e.g. Java) to 
enable your code do directly access a parsed XML document as an instance 
of a class where you have typed members.

And web services using SOAP for instance might do there type marshalling 
based on XSD schema description.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/29/2006 1:38:41 PM
"randy" <randy@d.com> wrote in message 
news:epn7HexyGHA.1936@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I am fairly new to XML schemas and why to use them.  I am integrating with 
> another application via xml.  My questions are schemas only good to 
> validate the XML documents or can I use the schema to help me parse the 
> xml document?

If you're new to XML, the last thing you need is to be parsing XML which you 
_think_ matches the schema, only to find out days later that the bug you've 
been chasing is actually in the data.

Don't downplay schema validation. It will save you many hours.

John


0
John
8/29/2006 4:38:04 PM
Thanks for the posts.  Is there a good example how to use a schema to map to 
class in .Net?

Thanks

"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:%23mFf1B3yGHA.1936@TK2MSFTNGP06.phx.gbl...
>
>
> randy wrote:
>
>
>> I am fairly new to XML schemas and why to use them.  I am integrating 
>> with another application via xml.  My questions are schemas only good to 
>> validate the XML documents or can I use the schema to help me parse the 
>> xml document?
>
> Well you can generally parse an XML document without validating or having 
> a schema.
>
> On the other hand schemas are by now often used to map XML to classes in a 
> framework (e.g. .NET framework) or programming language (e.g. Java) to 
> enable your code do directly access a parsed XML document as an instance 
> of a class where you have typed members.
>
> And web services using SOAP for instance might do there type marshalling 
> based on XSD schema description.
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
randy
8/29/2006 5:05:00 PM

randy wrote:

> Is there a good example how to use a schema to map to 
> class in .Net?

A quickstart sample is here
<http://samples.gotdotnet.com/quickstart/howto/doc/xmlserialization/XSDFromCls.aspx>


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/29/2006 5:14:29 PM
Reply:

Similar Artilces:

SelectClipRgn question
Hi, I have: HRGN hRgn; ::GetClipRgn(pDC->m_hDC, hRgn); .... do stuff ... ::SelectClipRgn(NULL); Now, do I have to call DeleteObject on hRgn? I'm assuming not, because I didn't create the region. Correct? Now, I do: RECT rc = { 0, 0, 10, 10 }; HRGN hRgn = CreateRectRgnIndirect(&rc); ::SelectClipRgn(pDC-m_hDC, hRgn); DeleteObject(hRgn); I correctely am calling DeleteObject right? The online docs do not mention having to do that, but I saw it done elsewhere on the net. Lisa "Lisa Pearlson" <no@spam.plz> wrote in message news:etppGfzsEHA.3320@TK2MSFTNGP15.p...

Scroller chart questions
-------------------------------------------------------------------------------- http://www.andypope.info/charts/Scrolling.htm I am confused where the reference range SCROLL_DATA and SCROLL_LABELS are set. -- slamm ------------------------------------------------------------------------ slamm's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15018 View this thread: http://www.excelforum.com/showthread.php?threadid=382365 with the help of Andy pope's page I have preapred a scroller chart file. If you are interested send me an email and I shall send it as...

question #8
I have this sheet. All data is input through an userform. I now need to make sure that data is not input twice... I mean... it can be input twice but I need to send a warning to the operator and I need both identical lines to be shown (in an userform?) with the choice to a. accept the input b. delete one of the 2 entries to avoid problems I would like to know if it is possible to format the cells in the sheet so that no matter what the operator writes the caracters are always capital.... I hope I make any sense.... thanks A better subject line will get more answers but YES, you may ...

General Permissions Question
Hi, Would there be any good reason to remove the System Account from the Exchsrvr main folder? I believe this is why I am receiving errors for our McAfee Exchange Virus scanner. Not sure why the account was removed, but I am thinking that this is our problem. thanks in advance for any help/ideas, Mel Hi, System account is for the oprating sysytem to access that folder it's a requierd permission for exchange server to function properly. ---cheers "Mel" wrote: > Hi, > > Would there be any good reason to remove the System Account from the > Exchsrvr main f...

Question about Name Order
Hi, I'm trying to help a friend out, but I couldn't track down anything on this: When clicking on Tools > Address Book, the names are listed first name first (John Smith). When typing in the search box, it searches on the first name. Is there any way to get this to work last name first instead? I've tried going into Tools > E-Mail Accounts, clicking "View or change existing directories or address books", and changing the properties of the address book. I have also gone to Tools > Options > Preferences and clicking "Contact Options". Neither o...

eConnect Schema
Can someone point me to the correct Schema/XML node to enter data to the Transaction Entry screen found in the path Transactions, Financial, Batches, Transaction button ? I believe that would be <taGLTransactionLineInsert>.... -- Bud Cool Microsoft Certified Business Management Solutions Specialist, GP 9.0 Financials Currently supporting: GP 9.0, SP2 "DavidM" wrote: > Can someone point me to the correct Schema/XML node to enter data to the > Transaction Entry screen found in the path Transactions, Financial, Batches, > Transaction button ? > > > ...

Tab control questions
Using Office 2003 and Windows XP; When using a tab control: 1) Does it wrap automatically so that the tabs are more than one layer deep if additional tabs are inserted? 2) Is there a way to control when the tabs wrap to a second row or where the break will occur or is this just automatic (i.e. whenever it runs out of room)? 3) I'm sure I won't get anywhere near it, but what is the limit on the number of tabs? Thanks in advance. On Dec 17, 10:45 am, XP <X...@discussions.microsoft.com> wrote: > Using Office 2003 and Windows XP; > > When using a tab control: > ...

Where do my questions go?
The last 2 questions I have asked on this site under Windows XP General have just disappeared. I can till see my previous questions but not the last 2. Help point me in the right direction please? Charlie3110 wrote: > The last 2 questions I have asked on this site under Windows XP > General have just disappeared. I can till see my previous questions > but not the last 2. Help point me in the right direction please? Unfortunately - the trouble could be anywhere. You are using the Microsoft web interface for the Newsgroups to paste these messages it seems: X-Newsreader...

Registry question
Hello Group, How can I create a registry key that can be deleted by any user on the machine. A sample code or any other reference will be greatly appreciated. Thanks, Geo On Fri, 17 Oct 2003 07:49:25 -0700, Geo wrote: >How can I create a registry key that can be deleted by >any user on the machine. Then you'd have to put it under HKEY_LOCAL_MACHINE. See the family of functions which begin Reg... with particular attention to RegCreateKeyEx, RegSetValueEx and RegCloseKey. Here's a sample (trivial) function. It adds a key/value, and is designed to make the registry look l...

Another Query Question
Hi all With the help of Ken Sheridan, I feel in touching distance of a solution to my current application issues. I have a union query which returns results on links made between accounts. Each entry represents a defined link between 2 accounts - there is a remarks column (not shown) associated to the link describing the reason behind it. There are 2 fields in the union query: link-id and ac-id. So the output of the union query looks like: link-id ac-id 1 1647 2 1639 3 1681 4 1677 5 1681 1 1677 2 ...

Excel combobox question
I have a worksheet (which is created from a template) which has several comboboxes on it, and when you open the boxes there is data. However, I do not see any code behind it - I right click on it and I get what looks like regular choices e.g. copy,paste. They are all named ranges. Do anyone have any idea what these are and how to get access to the data and/or the code? Thanks. ...

drop down list question #3
hello, I am rather new to excel programing and have a simple question. I am hoping that someone can set me in the right direction. I have a drop down list and the ListFillRange is set to Sheet2!$A$2:$A$5. Is there an easy way to store a different value for each item in the listfillrange? For example, if an item in the drop down is displayed as Bob Smith, is there a way to store an employee number with Bob Smith in the drop down? I hope that this is clear enough. I want to do this so that I can use the employee number in another cell. Thanks, Billy What you can do is create a table of ...

question for excel how to have linked sum in column?
Hi, I have a column that is full of Y's and N's as values. I am constantly adding to this column so for example- on day one I might have 50 Y's and 50 N's in this column and day 2 i might have 100 Y's and 50 N's in this same column. How do I make a chart/table in excel that will automatically give me the current # of Y's and N's in this column as well as their respective percentages? So if I checked on day 1, this chart will tell me I have 50 Y's and 50 N's (in column C for example) and that 50% of the values are Y and 50% are N. On day two th...

Project table schema changes in 9.0
I upgraded a server from GP 8.0 sp5 to GP 9.0 sp2 last weekend. All seems to work fine so far. I have some Crystal Reports that were in the process of being developed and I have questions about 3 Project tables. These tables each have had fields removed. My question is...Where has the data these fields represented been relocated? Has the upgrade taken data from these tables and moved it to other tables? PA10721 -> PA31101 -> PA31102 -> *** Lists the fields added and removed in Project tables *** C:\Program Files\Microsoft Dynamics\GP 9.0 SDK\Content\8.0to9.0\PaTableDetailed_...

Webserver question
Hi all, I have a delphi program, which has to be "converted" in a visual C++ program. Delphi code follows: procedure TFormMain.POST(url: string; s: string); var IdHTTP: TIdHTTP; Request: TStringStream; Response: TStringStream; begin IdHTTP := TIdHTTP.Create(FormMain); Request := TStringStream.Create(s); Response := TStringStream.Create(''); try try IdHTTP.OnStatus := IdHTTPStatus; IdHTTP.Port := Port.Value; IdHTTP.Host := IPAddr.Text; IdHTTP.Request.ExtraHeaders.Add('Authorization: Basic '+ Base64Encode(Login.Text+':'...

xsd.exe errors with schemas importing other schemas
Hi, I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references another schema and the XSD.exe is having trouble finding the referenced schema. Does anyone have an example of what the command line params would be so that the tool is aware of all schemas? Does the tool have trouble with the XSD lines: xmlns:r="somewhere.files.referencedxsd" <xs:import schemaLocation=".\referencedxsd.xsd" namespace="somewhere.files.referencedxsd" /> <xs:element ref="r:ReferencedRo...

PrintDialog question
Can I bring up a printdialog or printsetupdialog and apply its settings to the device context when next printing? ...

xml schema: elements with unique attribute values.
Hi all. I�m a bit newbie writing xml schemas. Is it possible to define xml element that must have unique attribute values in same level. For example if i have a xml - document: <list> <subsection name="first"> <!-- subsection contents --> </subsection> <subsection name="first"> <!-- ERRROR!!! --> <!-- subsection contents --> </subsection> <subsection name="second"> <!-- subsection contents --> </subsection> </list> Schema: <xs:complexType n...

A Question, Hiding Child frame in MDI App.
Hi, everybody. I need to hide child frame in MDI app. But, I will use document and view in the child frame. So, I've got to hide the child frame with no destruction. ShowWindow( SW_HIDE ) makes the child frame just minimize. Is it possible to hide child frame in MDI app? I need your helps. Help me~ On Jan 31, 12:39=A0am, MuMbi <mu...@daum.net> wrote: > Hi, everybody. > > I need to hide child frame in MDI app. > > But, I will use document and view in the child frame. > > So, I've got to hide the child frame with no destruction. ...

intersect question
Is it possible to use more than once the intersect methode? I tried next code, but it does not work. Any ideas? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub Set LastCellChanged = Target If not intersect(LastCellChanged, Range("f6:f25") is nothing then 'Do something else If not intersect(LastCellChanged, Range("h2") is nothing then 'Do something else else 'Do 3rd thing end if end if End Sub Ju...

SQL select statement question
My dataset has 3 columns: customer id, store location, charges I'd like to write a single select statment that will show each customer id once, with the store location where they have the most charges, and the sum of the charges for that store location. This gives the max charges for each customer, but doesn't give the location: select a.custID, max(new.amt) from smallchg a inner join; (select custID, location, sum(charges) as amt from smallchg group by custID, location) as new ; on a.custID= new.CustID group by a.CustID thanks. joel Try this -- SELECT TOP 1 ...

Question on DragQueryFile
I am currently using the DragQueryFile funtion with iFile parameter set to 0xFFFFFFFF to get a count of the files dropped. Unfortunately if the dropped files are shortcut files, this function returns '1' regardless of number of files got dropped. Does anyone know how to get around this problem. Thank You! Ririko Horvath wrote: >I am currently using the DragQueryFile funtion with iFile parameter set to >0xFFFFFFFF to get a count of the files dropped. Unfortunately if the dropped >files are shortcut files, this function returns '1' regardless of number of >files...

Questions on emailing access reports in a snp and PFD format & FAX
I am in the process of developing an application which is to send ACCESS reports to suppliers (Monthly Supplier Performance Report cards). I am using the VBA code from the references which I was directed to, from this forum. I use the Stephan Labans code to convert the ACCESS report to a PDF format. I send a MS Outlook message with 2 attachments (a snapshot {snp} and PDF version of the report). Currently the code works if I close the open PDF version of the report before the code increments to the next supplier (next recordset record). If I do not manually close the displayed PDF...

Reporting Question 10-30-07
I have a custom report that I need to run every month. However, I am needing to change the query each time I run it to change the date that this report is centered around. Can anyone tell me an easy to do this without having to recreate a report each month and export it to excel and change the formatting?? Please help. what parameters or conditions r you using in query? If you post here , might be someone of us can give you the overview. /Aamir Can you use a more generic date/time logic such as records in the last 2 weeks, last month, etc? You can build this type of logic into you...

Legend question
I have 3 rows of data; Dollars Calls Cost per Call Pretty simple except the boss now wants me to chart it and put the dollars row in the legend at the bottom but not have it show up in the chart. Is this possible? Thanks Davin Hi David- Try it this way; 1) Create the chart by selecting all the data (including labels), 2) Go to Chart>Source Data--Series, select the listing for Dollars & change the Values to a reference for an empty cell (preferably far away from any area of the sheet you intend to use), 3) For the Order, right-click a column & choose Format Data Series. ...