473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

File.xsd and duplicate ID value

Hello,
Here's a sample of a file.xsd and file.xml I wrote :

File.xsd:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="LogErrori" targetNamespace="http://tempuri.org/LogErrori.xsd"
elementFormDefault="qualified"
.........
.........
<xs:sequence>
<xs:element name="ID" type="xs:ID" minOccurs="0" />
<xs:element name="Utente" type="xs:string" minOccurs="0" />
.........
.........

</xs:sequence>
.......
.......
</xs:schema>

File.xml
<?xml version="1.0" standalone="yes" ?>
- <NewDataSet>
- <Eccezione>
<ID>1</ID>
<Utente>INFORLUAR</Utente>
<Messaggio>Nuova eccezione catturata</Messaggio>
<Provenienza>Form: ASP.formPaginaCopertina_aspx</Provenienza>
<IP>127.0.0.1</IP>
<Data>11/10/2003 16.27.22</Data>
</Eccezione>
- <Eccezione>
<ID>1</ID>
<Utente>INFORLUAR</Utente>
<Messaggio>Nuova eccezione catturata</Messaggio>
<Provenienza>Form: ASP.formPaginaCopertina_aspx</Provenienza>
<IP>127.0.0.1</IP>
<Data>12/10/2003 15.33.19</Data>
</Eccezione>
</NewDataSet>

In this file.xml there are two ID=1
Must exist one ID=1

I use the Load method to load the XmlDataDocument
but I get no exception for the double ID value

Dim ds As New DataSet
ds.EnforceConstraints = True
ds.ReadXmlSchema("C:\Inetpub\wwwroot\Comunicazioni IconArchive\LogErrori.xsd"
)
Dim xmlDataDoc As XmlDataDocument = New XmlDataDocument(ds)
xmlDataDoc.Load(ConfigurationSettings.AppSettings( "RegistrazioneErroriXML"))

Can someone suggest a better way to relieve the exception ?

Thanks
Giuseppe


Nov 11 '05 #1
0 1198

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lowell Kirsh | last post by:
I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten...
3
by: Nhmiller | last post by:
I searched here for an answer. I am entering records into a database, and it would save a lot of time if I could duplicate a record that is very similar to the new one I am about to enter, then...
1
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ...
12
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: ...
4
by: sri2097 | last post by:
Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file...
4
by: RedHair | last post by:
I'd like to set up a file system for the ASP.NET 2.0 application to store user-uploaded files, since the members are more than 100,000 people, the basic requirements are as below: (1) The file...
7
by: Jim | last post by:
Greetings, all Can anyone tell me what's wrong with the following XSL snippet? I'm getting absolutely no display on the following: <xsl:template name="tier3"> <xsl:param name = "currentID" />...
4
by: FangQ | last post by:
hi I am very new to mysql. I have a question about using the "on duplicate update" clause with insert command. my table "data" has two columns, field1 and field2, where field1 is the index...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: xraive | last post by:
I have a problem with this. Currently I am trying Allen's code and i am not successful. Current Design Table1 (Main Form) TravelID (PK) ApprovedBY EntreredBy BudgetCode ExpenseCode
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.