House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Validate XML Documents

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Validate XML Documents

The JRE 1.4.2 that ships with CF 6.1 doesn't include XSD validation as part Massimo, Tiziana e Federica 04/27/2004 12:59 AM
Here is a good blurb on how to do it in java - pretty similar steps in Rob 04/26/2004 11:04 PM
On Mon, 2004-04-26 at 13:29, Troy Simpson wrote: Rob 04/26/2004 10:45 PM
I guess you can use Java XML parsers Qasim Rasheed 04/26/2004 10:03 PM
Ah, sorry about Raymond Camden 04/26/2004 04:47 PM
Thanks for the response. Troy Simpson 04/26/2004 04:39 PM
www.cflib.org/udf.cfm Raymond Camden 04/26/2004 04:35 PM
All, Troy Simpson 04/26/2004 04:31 PM

04/27/2004 12:59 AM
Author: Massimo, Tiziana e Federica Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161383 The JRE 1.4.2 that ships with CF 6.1 doesn't include XSD validation as part of its APIs. You can install and use another XML parser to do the job (Xerces is the first that comes to mind) You already got suggestion about the code required, the topic is covered very well here: http://www.ibiblio.org/xml/books/xmljava/chapters/ch07s04.html#d0e10881 ---------------------------- Massimo Foti http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/
04/26/2004 11:04 PM
Author: Rob Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161379 Here is a good blurb on how to do it in java - pretty similar steps in cf http://www.geocities.com/herong_yang/jdk/xsd_validation.html On Mon, 2004-04-26 at 19:39, Rob wrote: ----- Excess quoted text cut - see Original Post for more ----- -- Rob <me@robrohan.com>
04/26/2004 10:45 PM
Author: Rob Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161378 On Mon, 2004-04-26 at 13:29, Troy Simpson wrote: > All, > > Is there a ColdFusion Function to validate an XML Document against a its > schema? As far as I know the only java parser (last I heard anyway) that validates with a schema is Xerces (which cf uses I think). However, I don't think there is a standard, cross parser, way in java to do xsd validation (unlike dtd) so there are not many java products that do xsd validation yet. This is quite a stretch as my cf sever is out of commission right now so this is a totally untested code - but you could try something like: <cfscript> parser = CreateObject("java","org.apache.xerces.parsers.DOMParser"); //this might be needed... //parser.init(); parser.setFeature("http://xml.org/sax/features/validation", true); parser.setProperty(   "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",   "test.xsd" ); parser.parse("test.xml"); </cfscript> Look around on the www.apache.org site for xerces xsd validation, if cf still uses it ... it might use Crimson ... some MM guy might chime in... Good luck, -- Rob <me@robrohan.com>
04/26/2004 10:03 PM
Author: Qasim Rasheed Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161374 I guess you can use Java XML parsers Qaso, Thanks for the response. This only validates a formatted XML string against a DTD. I need to validate the XML doc against an XSD. Troy Raymond Camden wrote: > www.cflib.org/udf.cfm/validateXMLString >   _____  
04/26/2004 04:47 PM
Author: Raymond Camden Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161362 Ah, sorry about that.
04/26/2004 04:39 PM
Author: Troy Simpson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161359 Thanks for the response. This only validates a formatted XML string against a DTD. I need to validate the XML doc against an XSD. Troy Raymond Camden wrote: > www.cflib.org/udf.cfm/validateXMLString
04/26/2004 04:35 PM
Author: Raymond Camden Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161358 www.cflib.org/udf.cfm/validateXMLString
04/26/2004 04:31 PM
Author: Troy Simpson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32158#161357 All, Is there a ColdFusion Function to validate an XML Document against a its schema? Thanks, -- Troy Simpson    Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 E-mail: Troy_Simpson@ncsu.edu
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference