xml schema, order unimportant

I've got some xml that looks like this:

<root>
    <name></name>
    <id></id>
    <section>
        <question></question>
        <question></question>
    </section>
    <section>
        <question></question>
    </section>
</root>

name and id must appear and my appear in any order
section may appear 0 or more times,
question may appear 0 or more times.

I use a choice group with maxOccurs= unbounded so that the elements could 
appear in any order.  My problem is that now each element can appear more 
than once, or not at all. I need to require that the name and id appear 
once, while section and question can appear 0 or more times.  I tried 
setting that on the individual elements, but it doesn't have any affect.

<?xml version="1.0" encoding="utf-16"?>
<xs:schema>
    <xs:element name="root" xs:complexType mixed="true">
        <xs:complexType mixed="true">
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element maxOccurs="1" name="name" type="xs:string" />
                <xs:element maxOccurs="1" name="id" type="xs:string" />
                <xs:element maxOccurs="1" name="Section">
                    <xs:complexType mixed="true">
                        <xs:sequence>
                            <xs:element maxOccurs="unbounded" 
name="Question">
                                <xs:complexType mixed="true">
                                    <xs:sequence>
                                        <xs:element name="Question_Text" 
type="xs:string" />
                                        <xs:element name="Answer_Text" 
type="xs:string" />
                                        <xs:element name="Answer_Value" 
type="xs:string" />
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:complexType>
    </xs:element>
xs:schema> 


0
nospam6568 (71)
11/1/2007 6:17:36 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
637 Views

Similar Articles

[PageSpeed] 17

Reply:

Similar Artilces:

Importing Purchase order documents
Hello All Quick! I need a reliable tool to import PO documents into GP. I've just tried table import and it doesnt work so I need an alternative suggestion. Its non-existant in IM even they MS went to the trouble to building the data sources. Please help! Regards & thanks in advance Louella, Please drop an email to discuss. MV nj.tech@hotmail.com "Louella" wrote: > Hello All > > Quick! I need a reliable tool to import PO documents into GP. I've just > tried table import and it doesnt work so I need an alternative suggestion...

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 ...

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...

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 ...

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...

Bug in Order Fulfillment?
Here is my settings: Order: Allocation = None Fulfillment: Allocation = Line Item; Allow Qty BO; Allow Transfer to BO BO: Allow transfer to Order. If order quantity = 1000, try to fulfill such that the following are met: Qty Ready to Fulfill = 200 Qty Fulfilled = 200 (it's lot number item so you have to select lot number(s)). Qty to Back Order = 800 Save this. Now, open the same document, point to the particular item, straight away click the Serial/Lot button to remove the lot number (the intention was to make the Qty Fulfilled 0), click OK. Click Continue on the warning message. ...

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...

Sales Open Order Report with PROFIT MARGIN
Hi, does anybody knows if it's possible to modify the Sales Open Order Report whith Report Writer to include a field with a Profit Margin? Or is there a way to get the info from the Sales Open Order Report using SmartList? We're using GPv.8.0 Thanks. -- National Packaging Services When using a perpetual inventory method the COGS is not calculated until the Invoice is posted. Therefore the profit margin cannot be determined on an Order. You can use the Current Cost field to estimate, but the amount may change once the Order is transferred to an Invoice and then the Invoice is ...

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/ ...

Who cancelled a Purchase Order
Hola Does anyone knows how to find out who cancelled a purchase order. I am running Dynamics GP 10 with SQL 2005. -- LOS Hi Carlos, It doesn't store that data anywhere. I believe what the system stores is the user who entered the PO. Regards, Rheiner "Carlos" wrote: > Hola > > Does anyone knows how to find out who cancelled a purchase order. I am > running Dynamics GP 10 with SQL 2005. > -- > LOS If it is happening frequently, you could get Audit Trails and activate them. -- Richard L. Whaley Author / Consultant / MVP...

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...

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...

Engineering change order ISV
We are not impressed with the Great Plains ECO module. We want to use Great Plains manufacturing module but are looking for alternatives on ECO functionality. Can some of you suggest any other ISV products that will work with Great Plains? KT I think Horizon Software has as offering for this. http://www.hzs.com/solutions/index.asp -- Jim@TurboChef "KT" wrote: > We are not impressed with the Great Plains ECO module. We want to use Great > Plains manufacturing module but are looking for alternatives on ECO > functionality. > > Can some of you suggest any...

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. ...

Purchase Order Approvals will not activate
We have it running in one company on version 10. I've tried to set it up in a test company, but the checkbox keeps getting unchecked. I tried in Fabrikam and same issue. There is no approval box on the PO entry window. We moved our databases from one server to another and noticed that there are tables that reference the Database ID from the master database. There is nothing in any documentation about reconciling these to the new ones or modifying them? The POE still seems to work in one company, but why will it not activate in any other companies? When you copy a dat...

how to include order number in econnect
I am generating an order schema that I want to import to Great Plains. I would like to use the tagetsopnumber stored procedure in my schema to get the document number for the sales order header and lines. However, I cannot figure out how to include the stored procedure into the econnect schema and how to retrieve the value of the next available doc number and assign it to the document number node of the schema. my email is jacktundra@hotmail.com if someone wants to email me an example. "Jack" wrote: > I am generating an order schema that I want to import to Great Plains. I...

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...

Tab Ordering / Default Focus
Just two quick questions about tab ordering and the button that has the initial focus on startup. 1: Is there an easy way to specify tab ordering like VB, or do I need to make an accelerator? 2: How can I set the focus to a specific button on startup of the application. I've tried... m_MyButton->SetFocus(); which is located in the OnInitDialog(), but it does not seem to work. Any ideas? Thank you for your assistance. To adjust the tab order in VC6, select the dialog from the resource editor, then from the main menu seldect Layout->Tab Order In VS5.NET, select the di...

Saving DataSet as XML in ADO format using VB.NET
Hi, I am trying to convert a lot of web reports from ASP/VB to ASP.NET/VB.NET. I would like to save my dataset in XML and then use XSLT to transform the XML. The catch is I would like to have the XML in the format that ADO uses versus the default format in which ADO.NET uses. Currently, I am using ADO within .NET, but I am concerned about the performance and it might improve if I used the native data providers for .NET. I am not sure if I am missing something but how do I save the .NET DataSet to XML in the OLD ADO format? Thanks for you help in advance and it is most appreciated. In the ...

XML variable for description on receipt?
Hi, I would like to add a description (actually all of those 3 extended descriptions) to display on the printed receipt under the main description. What is the variable to do that? Entry.Item.Description Entry.Item.ExtendedDescription Entry.Item.SubDescription1 Entry.Item.SubDescription2 Entry.Item.SubDescription3 R. "Zorian" <Zorian@discussions.microsoft.com> wrote in message news:F4425EAC-62B6-46FE-826A-D8BA2AA75DBB@microsoft.com... > Hi, I would like to add a description (actually all of those 3 extended > descriptions) to display on the printed receipt un...

xml to SQL
Hey we have a project in which a company produces a XML page in reply to actions on it's site. I see that SQL 2000 works well with XML so Can someone point me in the right direction, I would like to take the XML from thier SQL and have it "post" to own sql server (add,create, data, modifity and delete data on the fly). I was looking at doing XML to HTML and then passing to some a ASP but if we can grab from the responsetext then we could save time and headaches. Now I really know next to nothing about XML but I am reading all the newsgroups and pulled now TONS of xml / sql stuff ...

Notes Schema Name
Hi all, Can anyone please tell me what is the notes schema name and whether or not I can apply a java script on it - in the onload or onsave options in the form. Tnx alot.. Hi, The schema name is Annotation. However it is not possible to customize the onload/onsave event the way you can do it with the other entities. However a callout is supported. You can write code for Create, Update, Delete and Assign. Hope this helps, Merijn van Mourik http://crmerijn.blogspot.com "Guy Shokrani" wrote: > Hi all, > > Can anyone please tell me what is the notes schema name a...

new xml file is larger than the original
i'm working on a windows application that will edit and create xml files from another application. the original file is 83k, the one created by my vb.net program is 153k but all i add is a new xmlelement when i use the other program and add a xmlelement is only increased the file to 85k. how come my application increased 70k in size and also added the <?xml version="1.0"?> when i didn't tell it to. how do i duplicated a xml file and only add the xml element that i want to insert. where did the extra 70k come from. thanks here is my code: Dim newEvtEnr...

Invoice prints original quantity ordered not quantity on invoice
When we print an invoice, it shows the original quantity ordered and not the actual fulfilled quantity as shown on Sales Transaction Inquiry Zoom. The Extended Price on the printed invoice is calculated with the fulfilled quantity though. If we open the Order, Quantity Ordered = 1, Extended Price = $0.92 If we open the Invoice, Invoice Quantity = 55, Extended Price = $39.60 If we print the invoice, Qty = 1, Extended Price = #39.60 ????? Now, if we open Sales Quantity Status Inquiry Zoom for the invoice, it says: Current Quantities: Invoiced = 1 Billed = 1 Originally Ordere...