DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: validating XML against given XSD

  1. #1
    Join Date
    Jul 2008

    validating XML against given XSD

    i have a xml file & a given xsd

    XML file will be created from any source of data
    after the file creation i need to just validate/ check the data against the given xsd
    ie if a field is defined a numeric and if any charcter is entered in it than it shld display the invalid data error msg
    if a field needs to contain a date field & if the data is invalid as checked against the xsd it shld display the message


    is this way of validation for XML possible against a given XSD??
    or how do i solve this issue

  2. #2
    Join Date
    May 2009
    United Kingdom
    You can restrict content to allow for detailed validation using the XSD:

    However, the validation result depends upon what you are intending to use to perform the validation!?

  3. #3
    Join Date
    Jul 2008


    currently i am referring which has a good example

    but the only prblm is i not able to select any other xml document

    i need to allow the users to select the xml docuument & the associated xsd shd automically be taken
    is there any such example

    i dont need to give the validation parsmeters
    i am given both xml and xsd i need to validate the xml against xsd

  4. #4
    Join Date
    May 2009
    United Kingdom
    I am not aware of any standard example for this. However, your issue lies with the UI design and implementation not with the XML and it's validation.

    Try looking at the OpenFileDialog of Windows Forms or similar if using WPF.

    Additionally, I am not aware of anything that will automatically detect the schema in .NET. I believe XML editors key off of the xsi:noSchemaNamespace attribute, which is normally used to define the path of the schema. This path could be resolved to a schema, alternatively you would need to add the functionality to allow the user to specify the schema in addition to the XML.

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2010, 10:50 AM
  2. Validating XML fragment against schema
    By teclioness in forum .NET
    Replies: 0
    Last Post: 10-07-2005, 07:10 AM
  3. Try XML Junction
    By Tim in forum xml.announcements
    Replies: 0
    Last Post: 10-11-2001, 04:00 PM
  4. XML Startkabel Updates
    By xmlstartkabel in forum XML
    Replies: 0
    Last Post: 10-10-2001, 04:07 AM
  5. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center