Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2007, 12:43 PM
Authorized User
 
Join Date: Jun 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajatake
Default Validation of XML file


Our system creats XML file dynamically. When thr user clicks the Preview button, the XML should open in the Ineternet Explorer.

If the XML file is not valid, the file is not getting open in the IE.

We should give the provision to the user to preview the XML though it has errors or not valid one.

I removed the Schema information from the XML file. Still it not getting opened in IE.

I assumed IE has inbuilt parser to parse the XML.

Is there any provision to open the file in IE.

Please let me know.

Thanks in advance.

Regards,
Raja

 
Old March 28th, 2007, 05:33 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

What are you using to create the XML file? Its doesnt sound as if it is schema aware. IE will not parse an xml file if it is not well formed.

 
Old March 29th, 2007, 01:41 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

bonekrusher is correct, IE will only complain if the file is not well-formed, i.e. it's not XML, when attributes aren't quoted or an unescaped ampersand is present for instance. The way around this is to check before hand if it is badly formed by loading it into a parser first and then either save it with a txt extension before opening in IE or to open it in something like Notepad.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse xml (with validation) blackbird XML 2 October 2nd, 2007 08:27 AM
XML validation error alz6z XML 1 May 3rd, 2007 11:06 AM
XML Validation AdamPengelly C# 4 September 8th, 2006 06:36 AM
XML Validation June XML 5 February 17th, 2004 11:41 AM
xml validation error kreddy XML 0 August 20th, 2003 12:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.