Panel layout?XML Schema generation with optional elements

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Ive created a Windows forms project and I have a panel and a button in the designer. When I click the button, I want to add a sub panel to the main panel. So I set up the on click event and in the event I do

<div style="color:Black;background-color:White; <pre>
myPanel.Controls.Add(<span style="color:Blue; new Panel());
[/code]

And a new panel appears inside the main panel, great! I click it again.... nothing. I check the debugger on the 2nd click, myPanel.Controls has a length of 2, but the 2nd panel never shows.
Im


I need to generate a XSD from XML DataFile. My Data looks like<br/>
<DOCUMENTS><br/>
<DOCUMENT><br/>
<T1>TEST1</T1><br/>
<T2>TEST2</T2><br/>
<T3>TEST3</T3><br/>
<T4>TEST4</T4><br/>
<T5>TEST5</T5><br/>
</DOCUMENT><br/>
</DOCUMENTS>
I am trying to generate a XSD where I dont want to specify about the elements other than T2 and T4.I need only to verify if T2 and T4 exists and the schema validation should fail if any of them does not exist. Because the data file may change tomorrow and
I can add a new element <T6></T6> and I dont want to update the XSD. And also the elements can occur in any order. The elements T2 and T4 should occur only once and they are mandatory.
I am trying to use <xs:any> attribute, but I am not able to use it along with <xs:all>..
Any help is apprieciated

View the full article
 
Back
Top