xml xsd filling question

Hello,
I have a XSD that looks like this:

<xs:schema id="FlowInfo" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" 
attributeFormDefault="qualified" elementFormDefault="qualified">
 <xs:element name="FlowInfoRoot">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="FlowInfoData">
     <xs:complexType>
      <xs:sequence>
       <xs:element name="flowState" type="xs:string" minOccurs="0" />
        <xs:element name="traceRoot">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="trace">
           <xs:complexType>
            <xs:sequence>
             <xs:element name="traceComment" type="xs:string" minOccurs="0" 
/>
             </xs:sequence>
           </xs:complexType>
          </xs:element>
         </xs:sequence>
        </xs:complexType>
       </xs:element>
      </xs:sequence>
     </xs:complexType>
    </xs:element>
   </xs:sequence>
  </xs:complexType>
 </xs:element>
</xs:schema>


If I want to fill this, I use the following c# code:
dsFlowInfo.FlowInfoData.Rows.Add(dsFlowInfo.FlowInfoData.NewFlowInfoDataRow());
dsFlowInfo.FlowInfoData[0].flowState = flowstate;

This works without any problem.
However,
If I want to fill multiple "trace" rows, how do I do that ?
I want to add a row of type "trace" to "traceRoot"

dsFlowInfo.FlowInfoData.Rows.Add(dsFlowInfo.FlowInfoData.NewFlowInfoDataRow());
dsFlowInfo.traceRoot.Rows.Add(dsFlowInfo.traceRoot.NewtraceRootDataRow());
dsFlowInfo.trace.Rows.Add(dsFlowInfo.trace.NewtraceDataRow());

//filling of the elements is not included

This results in that <traceRoot /> is empty and that <trace> is filled 
correctly but is placed on the FlowInfoData level.  What must I do to create 
a new row of type "trace" on the level of "traceRoot" ?

Regards,
Nicolas


0
11/4/2006 2:04:58 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
468 Views

Similar Articles

[PageSpeed] 0

Reply:

Similar Artilces:

Registry key question
Hello all: I am trying to find out the equivalent to the HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences\CloseOrig registry key from OL2003 in OL2000. I want to be able to set the option that closes the original message on reply. I know this can be done manually from the options, but I want to be able to do it during installation for some software I need to write. I found out. If it is not there just create a new DWORD key and that works. ...

SBS2003 Migrates to SBS 2008 Questions
Hi All, A couple question: 1. Our current Lan is 10.8.X.X/255.255.255.0. Do I have to change to 192.168.X.X??? I think once I specify the server IP in the answer file, it will skip the detection and use my answer file right??? Just want to verify. 2. The requirement on source server MSXML6 with SP1, I have SP2, .Net Framework 2.0 I have 3.0 SP1Any way I meet all the minimum requirement, but some with higher version, that won't be a problem right?? 3. If I start some prep work on source server such as raising the funtion level and extend the schema, do I need to do the migrat...

Yet Another Subform Requery Question
Hi Groupies I am using A2007 I have a main form, frmJob which has a subform frmPurchases and this form has a subform, fsubInventory. My problem is the requery between the 2 subforms. If a customer places an order for 10 products, I need the quantity to change in fsubInventory, right now it isn't updating until I move between records. On frmPurchases in the field PurchaseQuantity After Update Event I have the following code: Me!fsubInventory.Form!TotalStock.Requery I have also tried entering the code to the frmPurchases After Update Event....no luck. What am I missing?!?!?!?!?...

IF FUNCTION Limitations question
Help would be very much appreciated. I will try my best to explain wha I am trying to do so let me know if you do not understand and I will tr again explaining it. First, I get a value for about 100 individuals that ranges within th table below. Once I figure out the value, I set up an IF statemen that gets the range for each individual. (E IF(AND(+$AF6<=-0.5,$AF6>-1),AJ$4,0). By doing this I can get eac persons range. Here is where I am having the problem. I have columns of data but can't use the IF function b/c it is limited to formulas. Example of what I was doing aft...

New to XML. Need help reading XML.
Here's my XML: <?xml version="1.0" ?> <AppMode Type="Network"> <CurrentFolder Path="c:\tabs"> <Tabs> <FilePath>tabs\Justin.tab</FilePath> <FilePath>tabs\Julie.tab</FilePath> *****There could be 1 of these or 100....quantity can change***** </Tabs> </CurrentFolder> </AppMode> All I need to do is load "Network" and "c:\tabs" into variables. Then each FilePath goes into an array. The following code gives me everything but Julie.tab. It only gives me one of the FilePaths....

problem with xsd list of qnames
I am writing a web service using the WSDL first method. The schema specified that an element called Types is a list of QNames. It expects the message representation of this to look like <Types xmlns=q1:xyz>q1:Name1 q1:Name2 q1:Name3</Types The generated class for this however simply maps this to XmlQualifiedName Types which then proceeds to blow up if you pass a space delimited list I tried simply making the type XmlQualifiedName [] Types but that simply results in nothing being deserialized into Types. I would happily call this a string and process it myself but I then have pr...

Question on Time zone settings on mailboxes
We have a 2-node Exchange cluster that houses mailboxes for everyone in the company. The servers are in Eastern time zone, but our users are all over the country. We applied all the DST patches to the OS and Exchange 2003 itself, and ran the Exchange Calendar Update tool. When we ran the tool, it came up with about a dozen "conflicts" and a slew of "nonexistents" (users whose timezone couldn't be determined). This leads me to a couple of questions: 1) should I be setting the time zone for my users to the location they are in? Or should they be set to what time zone th...

XmlReader and XML Web Control
Hi I am trying to use the XML Web Control and the XmlReade but when I try and load the xmlReader into the XmlDocument is gives me this erro Error: This document already has a DocumentElement node It fails at: doc.Load(myXmlReader Is there something I am missing Here is my code Dim myCommand As SqlCommand = New SqlCommand("Select proddesc from invli where custid = '1STRFA' for xml auto", myConnection myConnection.Open( Dim myXmlReader As System.Xml.XmlReader = myCommand.ExecuteXmlReader( Dim doc As XmlDocument = New XmlDocumen doc.Load(myXmlReader Dim trans As XslTrans...

xmlnode question
Hello, I'm new to xml and I have a question: I try to do the following Dim doc As New XmlDocument doc.LoadXml("<Request><Root><Requestor name='' /><FlowData flowstatus='' /><Products><productdate productid='' /></Products></Root></Request>") Dim node As XmlNode = doc.SelectSingleNode("Request/Root/Requestor/@name") node.Value = "TestValue" Dim node3 As XmlNode = doc.SelectSingleNode("Request/Root/FlowData/@flowstatus") node3.Value = &q...

FORMATTING - hard questions
I have a cell which has plain text i.e. "Hello World" but between Hello and World I press Alt-Enter to place the word "World" on the second line so that the column width doesn't have to be long. But when I reference this cell from another one, Excel not only shows a weird ASCII character in between the words but also does not show the two words on separate lines as in the original cell. Is thre a way around this? TRIM and CLEAN did not do anything. Also, I have a function that compares two cells =IF(A1=A2,"YES","NO") and I would like to do a cond...

Calculated field question
I have a query that summarises sales data for a particular month and cost centre. The data comes from our accounting system and is held in a single table in my database thus: tblNominal ------------ CostCode - Long Integer ExpenseCode - Long Integer Desc - Text Current - Double YTD - Doube Month - Text Year - Text The query sums the Current & YTD values for a particular month, grouping them by the Description field. This works fine to sum the Sales for say Retail (which is a group of Expense Codes) but I also want the query to show the Margin for that type of sale ...

Benefits many people
Thank you in advance for any help provided to the subject question. I am operating Excel 2003. A data query has been established to pull investment data from finance.yahoo.com (i.e. stock volume, % ownership of management, etc.). The query works fine and pulls approximately 50 values from the webpage. My questions is this: If I have a list of 100 stock symbols how can I link that list to the web based data query to automatically insert each symbol into the data query individually and then dump that data automatically to another worksheet within the same workbook. Should I use a ma...

xml as a new layer
Hi, Currently I have 3 layers in my application (client,business logics,server). I want to use xml layer in between client and server, I want some examples in which data must pass through from my Editable Grid to XML and from XML file to my Server. what is the real need to use XML in this scenario? Any help is very much appreciated. Thanks in advance Regards CT ...

a compatibility question
is there a utility or some kind of process that will scan my source code and tell me what operating systems my program is compatible with? thanks, ed There may be. Certainly programs like BoundsChecker for Windows have these options. I'm not aware of any static analysis tool, although it would be trivial to write one and incredibly tedious to enumerate the thousands of API calls. joe On Sun, 23 May 2004 17:05:07 GMT, "ed" <cteel04.notthis@hotmail.notthis.com> wrote: >is there a utility or some kind of process that will scan my source code and >tell me what o...

xml schema import help
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set of projects. Therefore, I wish to include the project customType in the projectCollection namespace. I therefore have declared two xsd documents: project.xsd and projectcollection.xsd These both validate. and two xml documents to test validation: project.xml and projectcollection.xml. project.xml validates perfectly, however all of the project tags within projectcollection.xml are not validated. Can ...

Install question
Hello, can I have SQL Server 2008 Express with advanced services with SQL Server 2008 Enterprise Evaluation installed on the same machine ? Thank you Gilles On Fri, 30 Apr 2010 07:49:10 -0700 (PDT), Gilles Koffmann <gilles.koffmann@gmail.com> wrote: >Hello, > >can I have SQL Server 2008 Express with advanced services >with SQL Server 2008 Enterprise Evaluation installed on the same >machine ? > >Thank you >Gilles Hi Giles You should be able to do this, have you tried and failed? John ...

Financial Question
I'm trying to do a simple reconciliation of my finances for the current year. Basically, the structure would look something like this: Net Worth 12/31/2004 + Income (including realized gains) for current year 2005 - Expenses for current year + Unrealized gains (losses) for current year = Net worth as of today Does this make sense? Does anyone know of a report that can provide this and have it balance, or alternatively, where I can pull the numbers from to have it balance? I've tried different reports and I've tried pulling numbers from Money. But, I can't find a pre-de...

Frx question
Having a problem trying to do a calc column. Is it possible to divide a colume by the base period number. For intance if this is August, i'd want the entire column divided by the number 8. What I've done in the past (to create averages) is create an excel file with the number 1-12 on A though L, then access the worksheet with a column period offset (CPO) setup. "GreatPlainsIntegrator" wrote: > Having a problem trying to do a calc column. Is it possible to divide > a colume by the base period number. For intance if this is August, i'd > want the entire c...

VS.NET creating XSD from XML doc
Hi: I usually add the available enumerated values for an attribute into the XSD manually. Does VS.NET have the capability to fill up the enumerated values list based on the original XML document, when I right click and click on "Create Schema"? Thanks, Do ...

Blocking Automatic Forward Question - E2K
Hi everyone, I need to stop my users from automatically forwarding mail to external accounts. I know how to do this but need to check some of the specifics: * What is the route of the email? Is there an NDR back to the user? * Does this add to the work that E2K box does? * If they have Inbox Assistants forwarding to internal recipients are those blocked as well? Many thanks in advance, Kou ...

Open XML File Converter
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Any word on an update to this converter that resolves the &quot;There is not enough memory or disk space to convert this document&quot; bug on SL? I've seen it reported elsewhere so I'm assuming it's a known issue, but can't find any relevant info here. <br><br>Thanks. Thanks Diane, nuked all caches and removed duplicate fonts but still getting the error. ...

GCD question
Hello - any wise person know why this happens and how to fix? In 2003 this cell formula returns #NAME? =B48/GCD(B48:B49)&":"&B49/GCD(B48:B49) In 2007 it returns the correct ratio value Any clues? Many thanks In fact the same thing happens with formula =GCD(D48:D49) on its own Oh its the analysis toolpak. sorry should have figured that out for myself without asking On Wed, 20 Oct 2010 13:11:39 +0100, teepee wrote: > > Oh its the analysis toolpak. sorry should have figured that out for myself > without asking Thanks for posting the solution, tho...

XML namespaces and XSD.exe
Oh boy i'm getting tangled in knots here. I have a schema which contains <xs:schema targetNamespace="http://Southend.Schemas.PAS/PASPatientDemographics.xsd" id="PASPatientDetails" xmlns:sh="http://Southend.Schemas.PAS/PASPatientDemographics.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> now i used the xsd.exe and it now generates elements when I serilaize the class I get <RequestingPatient_ID xmlns="">D1234567890</RequestingPatient_ID> So each emlement contains xmlns=&qu...

Conditional protection question
Hi, I have a question about setting up my workbook to do conditional protection. I have searched the internet for quite some time trying to find a solution to this problem. As background, our users want to populate a 12 month forecast with actuals from the complete month, and they want to be able to key in a number for the future months. Here's the situation: on tab1, called Instructions, I have a cell B9 that stores a value "Y" or "N". This corresponds to whether January should be populated with Actuals or not. On another tab, tab4, called Plan, if the value in ...

fill color in a list
I am new to excel and have created a list but now have decided to add a fill color to the options in the list. Is this possible so that when you pick a certain option it wil auto fill the cell with a specific color? Thanks in advance. Is your list simply a list of, say, names, in a range, say a1:a10? Is it a list using data validation. Perhaps not if you are new to Excel. No matter. It is possible but you will need to be more specific about what you have and what your aim is. Your answer will be conditional formatting but as I say, it depends on what you want to achieve. B...