XML validation of single value without entire XML document

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all,

Does anyone know if it is possible, and if so how, to perform validation of
a simple non XML string against certain XSD restrictions, without having the
entire XML document to validate against the schema.
To elaborate -
- Within XSD certain restrictions are defined for a particular
element/attribute, such as datatype, minlength, maxlength, valid enumeration
values etc.
Is it at all possible to validate a simple string value against these
restrictions defined within the schema.
I.e. I do not have the entire XML document that matches the schema. I do not
even have any XML at all - I simply have a string value which represents one
of the elements' values in the schema. I would like to utilise the power of
XSD to validate the value, rather than writing my own code to check the
datatype, length, allowed values etc.

Any suggestions appreciated!

Thanks,

Bardo


.



Relevant Pages

  • Strange error validating XML against XSD
    ... This method has one parameter (string your_data). ... value that this parameter will actually have is the content of a XML ... invokes my web method and it fails exactly when the XSD is performed. ... But when these guys invoke the method, ...
    (microsoft.public.dotnet.xml)
  • Strange error validating XML against XSD
    ... This method has one parameter (string your_data). ... value that this parameter will actually have is the content of a XML ... invokes my web method and it fails exactly when the XSD is performed. ... But when these guys invoke the method, ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Referencing the xml: namespace in BTS2004
    ... namesace as any other namespace instead of the reserved namespace the W3C ... except for the "lang" attribute qualified to the special xml: ... > able to validate your xsd file and also xml.xsd and you should now be able ... > generated XSD was equivalent to the original DTD. ...
    (microsoft.public.biztalk.general)
  • allow any child element in
    ... I want to create an xsd so that I can validate xml against it. ... is that the root node (named brl) exists in the document. ...
    (microsoft.public.dotnet.xml)
  • Re: Checking that a string is a valid attribute name ...
    ... XML should report any name violations any way. ... We are allowing users to define their own attributename value pairs ... I want to be able to validate the string they ...
    (microsoft.public.dotnet.xml)