473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

specify DTD location?

I need to validate incoming XML files in a VB.Net 2005 application that
must adhere to a DTD. This DTD is the only schema these XML files need to
validate against.

How can I specify/load the DTD, either as a file in the application path
(installed with the application), or better yet as an embedded resource?

It will be onerous for the user to have to be sure a copy of the DTD is in
the same directory as the importing XML file each time they want to import
and validate a file.

Thanks for any help I can get.
Apr 17 '07 #1
3 5307
Stephen Falken wrote:
I need to validate incoming XML files in a VB.Net 2005 application that
must adhere to a DTD. This DTD is the only schema these XML files need to
validate against.

How can I specify/load the DTD, either as a file in the application path
(installed with the application), or better yet as an embedded resource?

It will be onerous for the user to have to be sure a copy of the DTD is in
the same directory as the importing XML file each time they want to import
and validate a file.
The XML documents should have DOCTYPE node at the beginning e.g.
<!DOCTYPE root-name SYSTEM "whatever.dtd">
then you can set up an XmlUrlResolver to resolve that relative URL
whatever.dtd in a way you please.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Apr 17 '07 #2
Thank you for the response Martin, but that's what I don't know how to do.
Can you point me to an example?

Martin Honnen <ma*******@yahoo.dewrote in
news:Oc**************@TK2MSFTNGP04.phx.gbl:
Stephen Falken wrote:
>I need to validate incoming XML files in a VB.Net 2005 application
that must adhere to a DTD. This DTD is the only schema these XML
files need to validate against.

How can I specify/load the DTD, either as a file in the application
path (installed with the application), or better yet as an embedded
resource?

It will be onerous for the user to have to be sure a copy of the DTD
is in the same directory as the importing XML file each time they
want to import and validate a file.

The XML documents should have DOCTYPE node at the beginning e.g.
<!DOCTYPE root-name SYSTEM "whatever.dtd">
then you can set up an XmlUrlResolver to resolve that relative URL
whatever.dtd in a way you please.

Apr 17 '07 #3
Stephen Falken wrote:
Thank you for the response Martin, but that's what I don't know how to do.
Can you point me to an example?
Here <http://www.tkachenko.com/blog/archives/000653.htmlis an example,
it actually is about loading a stylesheet from an assembly but the same
approach helps if you want to load a DTD from an assembly.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Apr 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Till Soerensen | last post by:
I would like to validate a xml file against a xsd file on my hard disc. Ok, I could specify the location of the XSD Schema in the instance of the xml file as follows: <Person...
1
by: sid | last post by:
Is it possible to Specify a style sheet to be applied to an XML file from the URL. So that I can call the XML file from one location and have one transformation and also call it from another...
1
by: JD | last post by:
I've got a Windows Forms application that I'd like to NOT have an app.config file for. There are, however, a few "utility" assemblies used by the application and I'd like them to be in a...
4
by: deko | last post by:
Is it possible to define an array of all alpha characters? Array(a-z) doesn't seem to work.... Here's the code: For Each varAppt In cf.Items If varAppt.Location <> "United States" And _...
1
by: RA | last post by:
Hi Is there a way to specify where the custom EventLog file will be created? Thanks
2
by: TaeHo Yoo | last post by:
In my current web.config, I have these lines ----------------------------------------------------------- <authentication mode="Forms"> <forms name="frmAuthentication" loginUrl="login.aspx" />...
1
by: kplkumar | last post by:
Hi I am new to this. I am trying to create a setup project to package our stuff and create an installer. This is what I want to do, I have a directory sructure in which we have our...
1
by: theWizard1 | last post by:
Using Asp.NET 2.0. I published my web application to the server using the publish to website feature of asp.net 2.0. In VS.Net 2005 IDE, on solution explorer, at top level just below solution, I...
0
by: venkatbo | last post by:
Hi folks, On i686 Linux, I would like to place my python modules as: <base_dir>/src/py-modules/*.py and use the cmd from <base_dire>: ...base_dir]$ python src/py-modules/setup.py install...
2
by: =?Utf-8?B?TWFubnkgQ2hvaGFu?= | last post by:
Hello Guys, Just curious over the fact if i can store Image Location in Web.Config and then how can i extract that location in HTML <td style="width:1%" align="left" valign="middle"> <img...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.