Click here to Skip to main content
15,916,019 members
Home / Discussions / C#
   

C#

 
Question.net Pin
nilima Dash25-Apr-07 23:13
nilima Dash25-Apr-07 23:13 
AnswerRe: .net Pin
Christian Graus25-Apr-07 23:25
protectorChristian Graus25-Apr-07 23:25 
AnswerRe: .net Pin
Keshav V. Kamat25-Apr-07 23:46
Keshav V. Kamat25-Apr-07 23:46 
GeneralRe: .net Pin
Christian Graus26-Apr-07 0:20
protectorChristian Graus26-Apr-07 0:20 
Questionerror in xml validation with xsd(schema) Pin
praveenkumar palla25-Apr-07 22:53
praveenkumar palla25-Apr-07 22:53 
AnswerRe: error in xml validation with xsd(schema) Pin
Stefan Troschuetz25-Apr-07 23:17
Stefan Troschuetz25-Apr-07 23:17 
GeneralRe: error in xml validation with xsd(schema) Pin
praveenkumar palla26-Apr-07 3:23
praveenkumar palla26-Apr-07 3:23 
Questionxml validation with xsd(schema) Pin
praveenkumar palla25-Apr-07 22:51
praveenkumar palla25-Apr-07 22:51 
initially my xml file is


<lasers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nonamespaceschemalocation="laserProp.xsd">
<laser lasername="Laser1" modelname="Nufern v1.0" serialno="1" manufacturername="Nufern v1.0" maximumpower="200w">
<properties>
CW-Waveform.jpg
<wavetypes>
<wavetype name="CW Waveform" url="CWwaveform.html" isavailable="true">
<wavetype name="Relaxation Oscillation Envelope" url="RelaxOscillation.html"

isavailable="true">

<tabular>
<property id="300" name="System active" currval="0" prgbar="false" selected="false" min="0"

max="100" pwd="true" units="C" gauge="true" thresholdval="10">
<property id="301" name="Enable laser" currval="0" prgbar="true" selected="false" min="0"

max="100" pwd="true" units="C" gauge="true" thresholdval="10">






And my xsd is


<xs:schema attributeformdefault="unqualified" elementformdefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="lasers">
<xs:complextype>
<xs:sequence>
<xs:element name="laser">
<xs:complextype>
<xs:sequence>
<xs:element name="properties">
<xs:complextype>
<xs:sequence>
<xs:element name="image" type="xs:string">
<xs:element name="WaveTypes">
<xs:complextype>
<xs:sequence>
<xs:element maxoccurs="unbounded" name="WaveType">
<xs:complextype>
<xs:attribute name="Name" type="xs:string" use="required">
<xs:attribute name="url" type="xs:string" use="required">
<xs:attribute name="isavailable" type="xs:boolean" use="required">





<xs:element name="tabular">
<xs:complextype>
<xs:sequence>
<xs:element maxoccurs="unbounded" name="property">
<xs:complextype>
<xs:attribute name="id" type="xs:integer" use="required">
<xs:attribute name="name" type="xs:string" use="required">
<xs:attribute name="currval" type="xs:integer" use="required">
<xs:attribute name="prgbar" type="xs:boolean" use="required">
<xs:attribute name="selected" type="xs:boolean" use="required">
<xs:attribute name="min" type="xs:integer" use="required">
<xs:attribute name="max" type="xs:integer" use="required">
<xs:attribute name="pwd" type="xs:boolean" use="required">
<xs:attribute name="units" type="xs:string" use="required">
<xs:attribute name="gauge" type="xs:boolean" use="required">
<xs:attribute name="thresholdval" type="xs:integer" use="required">









<xs:attribute name="LaserName" type="xs:string" use="required">
<xs:attribute name="ModelName" type="xs:string" use="required">
<xs:attribute name="SerialNo" type="xs:integer" use="required">
<xs:attribute name="ManufacturerName" type="xs:string" use="required">
<xs:attribute name="Maximumpower" type="xs:string" use="required">







now it is working fine, but when xml file has more than one laser(laser is child node of lasers) then it is giving validation error like

"The element lasers has invalid child element laser"

Help me on this

Thanks in advance

PraveenKumar Palla
QuestionHow to convert .doc to pdf in asp.net using c# Pin
attalurisubbu25-Apr-07 22:46
attalurisubbu25-Apr-07 22:46 
AnswerRe: How to convert .doc to pdf in asp.net using c# Pin
Christian Graus25-Apr-07 23:27
protectorChristian Graus25-Apr-07 23:27 
AnswerRe: How to convert .doc to pdf in asp.net using c# Pin
suibian_sx25-Apr-07 23:42
suibian_sx25-Apr-07 23:42 
QuestionError: A namespace does not directly contain members such as fields or methods Pin
cole2325-Apr-07 22:19
cole2325-Apr-07 22:19 
AnswerRe: Error: A namespace does not directly contain members such as fields or methods Pin
xibeifeijian25-Apr-07 22:22
xibeifeijian25-Apr-07 22:22 
AnswerRe: Error: A namespace does not directly contain members such as fields or methods Pin
Pete O'Hanlon25-Apr-07 22:27
mvePete O'Hanlon25-Apr-07 22:27 
QuestionSpecifying Environment variable in Post-Build Event Pin
kumar.bs25-Apr-07 20:58
kumar.bs25-Apr-07 20:58 
AnswerRe: Specifying Environment variable in Post-Build Event Pin
Martin#25-Apr-07 21:26
Martin#25-Apr-07 21:26 
AnswerRe: Specifying Environment variable in Post-Build Event Pin
Jaiprakash M Bankolli25-Apr-07 22:05
Jaiprakash M Bankolli25-Apr-07 22:05 
GeneralRe: Specifying Environment variable in Post-Build Event Pin
kumar.bs25-Apr-07 22:17
kumar.bs25-Apr-07 22:17 
QuestionHow to Display Data (Urgent) Pin
Sanjib Raj25-Apr-07 20:44
Sanjib Raj25-Apr-07 20:44 
AnswerRe: How to Display Data (Urgent) Pin
Christian Graus25-Apr-07 21:12
protectorChristian Graus25-Apr-07 21:12 
AnswerRe: How to Display Data (Urgent) Pin
Jaiprakash M Bankolli25-Apr-07 22:06
Jaiprakash M Bankolli25-Apr-07 22:06 
AnswerRe: How to Display Data (Urgent) Pin
Nouman Bhatti26-Apr-07 0:29
Nouman Bhatti26-Apr-07 0:29 
Questionhow execute multi SQL command (C# - ADO.NET) Pin
zeroonea25-Apr-07 20:14
zeroonea25-Apr-07 20:14 
AnswerRe: how execute multi SQL command (C# - ADO.NET) Pin
Vikram A Punathambekar25-Apr-07 20:59
Vikram A Punathambekar25-Apr-07 20:59 
AnswerRe: how execute multi SQL command (C# - ADO.NET) Pin
Jaiprakash M Bankolli25-Apr-07 22:15
Jaiprakash M Bankolli25-Apr-07 22:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.