Re: Validating XML against schema (XSD) possible with TCL?



ben@xxxxxxxx wrote:
I have been reading every bit of documentation I can find and am still
not clear if this is doable with TclXML or TDom.
I only need to read an XML file and validate it (+ use the data of
course) so SAX style implementation is enough.
Can anyone help?

Do you really want/need to validate it - or just to process it?

The Web Services for Tcl package allows you to take an XSD and an XML message and transforms it to a dictionary that you can process.

It does not validate that the XML meets the XSD -- it just pulls out the parts that meet the elements and makes a dictionary. I.e. no range checks and no error if additional elements are present or required elements are missing.

Are you actually attempting to make a Web Service call with a WDSL or what?

--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.



Relevant Pages

  • 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: Obsessive Compulsive XMLing
    ... As in 'validate the XML against a series of rules'? ... DTD, XSD, Schematron, Relax-NG.. ...
    (comp.lang.java.programmer)
  • Re: Test Driven Development and C#
    ... programmer comes along and needs to edit what I wrote and breaks my ... as the unit tests are broken and politely ask the developer responsible ... How does one go about Unit Testing data structures like XML that are ... validate if it's well-formed XML. ...
    (microsoft.public.dotnet.languages.csharp)
  • XML validation of single value without entire XML document
    ... entire XML document to validate against the schema. ... Within XSD certain restrictions are defined for a particular ... Is it at all possible to validate a simple string value against these ...
    (microsoft.public.dotnet.xml)