Is this scenario possible?

I've included an xml and a dtd file in my Resources folder (This is a 
Winforms VB project in VS2005.)  I'm planning on using the xml in Resources 
as a 'template', just load it and change values.  The beginning code is:

  Dim xDoc As New XmlDocument
  xDoc.LoadXml(My.Resources.NameOfXMLFile)
  ... do some stuff to XDoc

Given that, is it possible to use a DTD in Resources to validate the XML?  

(I admit I'm having some trouble following the documentation on this point.)
0
BChernick (20)
7/3/2008 2:33:02 PM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
713 Views

Similar Articles

[PageSpeed] 7

B. Chernick wrote:
> I've included an xml and a dtd file in my Resources folder (This is a 
> Winforms VB project in VS2005.)  I'm planning on using the xml in Resources 
> as a 'template', just load it and change values.  The beginning code is:
> 
>   Dim xDoc As New XmlDocument
>   xDoc.LoadXml(My.Resources.NameOfXMLFile)
>   ... do some stuff to XDoc
> 
> Given that, is it possible to use a DTD in Resources to validate the XML?  

That should be possible by using a custom implementation of XmlResolver 
that ensures that the system identifier is resolved by loading the DTD 
from the resource.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
7/3/2008 2:42:06 PM
That's just it.  The basic ref states that it 'Resolves external XML 
resources named by a Uniform Resource Identifier (URI). '  Does this apply to 
this situation?  

"Martin Honnen" wrote:

> B. Chernick wrote:
> > I've included an xml and a dtd file in my Resources folder (This is a 
> > Winforms VB project in VS2005.)  I'm planning on using the xml in Resources 
> > as a 'template', just load it and change values.  The beginning code is:
> > 
> >   Dim xDoc As New XmlDocument
> >   xDoc.LoadXml(My.Resources.NameOfXMLFile)
> >   ... do some stuff to XDoc
> > 
> > Given that, is it possible to use a DTD in Resources to validate the XML?  
> 
> That should be possible by using a custom implementation of XmlResolver 
> that ensures that the system identifier is resolved by loading the DTD 
> from the resource.
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 
0
BChernick (20)
7/3/2008 5:08:08 PM
B. Chernick wrote:
> That's just it.  The basic ref states that it 'Resolves external XML 
> resources named by a Uniform Resource Identifier (URI). '  Does this apply to 
> this situation?  


Based on your previous post where you have
   <!DOCTYPE BDD SYSTEM "EAI.dtd">
the EAI.dtd is a (relative) URI that needs to be resolved to load the 
external DTD. If you put that into a .NET assembly as a resource then 
you need to provide a custom implementation of XmlResolver so that the 
XML parser finds the DTD in the assembly.
See 
http://www.hanselman.com/blog/LoadingXmlSchemaFilesOutOfAssemblyResources.aspx 
for an example, it deals with schemas but the mechanism is the same 
whether the parser needs to access a referenced DTD or a referenced schema.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
7/4/2008 11:13:22 AM
Reply:

Similar Artilces:

Excel Scenario Manager should let me re-order scenarios (in the s.
Within the scenario manger dilog box (excel 2002) I have several scenarios. Within the scenario manger dialog bos I want to re-order the scenarios I created. ...

Exchange 5.5: Virus scan diagnostic possible ?
Is it with Exchange 5.5 possible to get events about the start and end of the Background Scan activities of the AVAPI I know that under Exchange 2000 and above it is possible by increasing the diagnostic level of MSExchangeIS/System/Virus Scanning to at least "minimum" In Exchange 5.5 I didn't find this point We have to be sure that Background Scanning is completed before next one starts because of a virus signature update Has anyone a idea how to get this information Thanks! That feature was added in 2000, did not exist with 5.5. I would check with your AV vendor and not be ...

Worst case scenario with a cluster
Hi, We are a shop that tends to look after a large amount of smaller scaled (~500 user) exchange servers. We perform backups with a variety of methods, and have always had a worst case scenario plan. No matter what has happened with hardware, we've always known we could drop a PC on its side and use last night's backup to turn it into a temporary "server" (ableit, a very slow one) while the real hardware is repaired. I have asked this question in other forums so I need to make this statement first. Yes, the above IS possible, even though hardware is totally different. We ...

scenario/what if ??
I have no idea how to accomplish tis but I am sure that it is possible in Excel. I have data that tells me for each day of the week for thre months how many visitors I get to the area. I have 5 staff and I also know how much time they are utilised for the day. ie they are kept busy say 20% of the time as a group for the visitor load on a Monday. Can I use tis info in a spread sheet to do 'what if' such that if I get an increase in visitors what utilisation I will get from the 5 staff - conversely if I have 3 staff with the same visitors what utilisation do I now get from the s...

Possible Public Folder Corruption
I still have ek23 and ek55 coexisting right now. I used pfmigrate to replicate the ek55 PF to ek23 and all went well. Nearly all of my user mailboxes are still located on the ek55 server with only 5 on the ek23 server. The issue: The Veritas Backups for ek55 have been going much slower than normal. When the job is canceled, Veritas states in the error log "Database or Database element is corrupt". This occurs on the Exchange Public Folders. My question: What is the best course of action to resolve this problem? Should I assume that any corruption is also replicated t...

Is it possible to make CButtons transparent ?
hi, Is it possible to make CButtons transparent ? I tryed the transparent flag, and OnCtlColor, but it seems they do not do this. The buttons were still opaque. thanks, hamid wrote: > hi, > Is it possible to make CButtons transparent ? I tryed the transparent flag, > and OnCtlColor, but it seems they do not do this. The buttons were still > opaque. > > thanks, > > Easy with the owner-draw style. With owner-draw style you paint your own button. If you don't paint any background there won't be any background. -- Scott McPhillips [VC++ MVP] ...

check boxes + autofilter
hello, I'd like to use Excel in automation mode to create a worksheet in which consecutive columns of a row contain 1) a checkbox and 2) a label. I am a beginner in this subject and all I have done so far is only filling "a label" column using a code similar to: oE = new ActiveXObject('Excel.Application'); oW = oE.Workbooks.Add(); oW.Activate(); for(i=1;i<n;i++) { .. oW.Worksheets(1).Cells(i,2).value = Label(i); .. } I have two questions: 1) Is it possible "to link" a check box with appropriate "label" cell within the same row, in a ...

Cell Names in Scenario Summaries
Does anyone know a way to get a Scenario Summary to automatically show Names for cells (assuming they exist) rather than the cell references? For example, a Scenario Summary will show: $A$1 500 $B$1 1000 when those cells might be named "Dogs" and "Cats". I can always copy and paste afterwards, but that's not very elegant. TIA The Scenario Summary should automatically use the cell names, instead of the cell references. Check the Names List (Insert>Name>Define to see if the names exist. Bufo Calvin wrote: > Does anyone know a way to get a Scenario...

is it possible to do this? for income tax withholding
i want to know if this is possible... i think it is i just dont know where to start.. here is my situation: i want to calculate income tax to be withheld from a certain ammount of dollars, this is for certified payroll forms that need to be turned in for government jobs the things that affect how much will be taken out is based on: married or single status (M or S in my excell sheet) Ammount of dependants Ammount made for this payroll. here is an example how the table looks like in the 2005 employers tax guide ------------------------------------ If Married If wages are at least: 740 But ...

Multiple Problems--Possible Corruption of Local Live Program
Starting about 2 days ago, my onsite program to access Windows Live Hotmail (which I've used successfully for 9 months) has acted unstably. Here are the symptoms: (1) About half the time I start the program, my address book is missing--i.e. "contacts" show zero. The other half of the time, it does appear. (2) In responding to some emails, the enter key doesn't function. (3) I can't send a message in which I copy-and-pasted some Excel lines. The send function just hangs up. (4) When I do have a malfunction, I am sometimes unable to end the "wlmail" ...

Outlook on flash drive possible??
Would like to install Outlook (from Office XP) on a 4 gig flash drive in order that it is transportable from my office computer to my office in the home computer. Is this possible? I tried it but get the following error message when I try to start Outlook from the flash drive: Map132.dll is missing or the wrong version. Please reinstall Outlook again. I reinstalled again, with the same result. Hints/opinions??? TIA. Sorry to report this, but it can't be done to how the program registers itself with the Windows operating system. Can you get away with just keeping a PST file...

COUNTIFS
Hi: I have tried many variations of different nested formulas and have had no luck solving this one. Here are the two scenarios that I am trying to accomplish: Scenario 1: Count 1 if the following criteria are met on a single line of data: Col F contains text (is not blank) Col G, H, and I do NOT contain "Dropped" Scenario 2: Count 1 if the following criteria are met on a single line of data: Col F contains text (is not blank) Col G, H, I all contain the word "Approved" or "N/A" - the tricky part is that there are several different variations ...

Is it possible to do the following?
Hi I am hoping that someone will be able to tell me how to accomplish the following... or perhaps point me in the right direction... I need to send out a weekly reminder to a group of users to get their expenses forms filed. I would like to do this automatically from Outlook 2003. Therefore, I would like to automate this process to send the same e-mail to the same distribution list, at the same time (approximately) every week. I have looked at 'rules' and 'options' on the message - but do not see a solution. I am not a programmer so a macro is beyond my reach. Thank you. ...

possible conflict in coding
I am having trouble with a query which involves multiple parts. It is tied up with asset management. In a nutshell there are three components CRC(Current Replacement Cost), ACC_Dep (Accumulated depreciation),WDCC (Written down current cost). Other commponents include difference between construction date and current date, design life of asset. When the date difference is equal to the design life the answer is 0 the e.g CRC= $64960, WDCC= $4256 (it should read the same as CRC/Design life (in this case 15)) and the ACC_dep is $64960 and it should read CRC-WDCC. As a result the totalsof all the ro...

Scenarios
What can you do with Scenarios? What are they used for. I recently created a workbook that uses scenarios to store information about a range of product models. The user selects a model from a dropdown list, and a macro shows the scenario for that model, with all the parts that are required to build it. There's a simplified example here: http://www.contextures.com/excelfiles.html Under Data Validation, look for Model Pricing Scenario. Diane M. McDonald wrote: > What can you do with Scenarios? What are they used for. -- Debra Dalgleish Excel FAQ, Tips & Book List http...

RMS 2.0 integrating with Office Accounting 2007 possible?
Hi All, Is it possible to integrate RMS 2.0 Office Accounting 2007? With POS2.0 its possible? and for RMS?? Dennis Do you have a reseller? They should be able to guide you on these questions. But the word around the water cooler is that RMS 2.0 will integrate with Office Accounting 2007. Gearing everything for v3.0's roadmap to the .net environment. Dont quote me on this, though I am pretty certain that this info is correct. -- Jere Hurn zeroedin, inc "Dennis" wrote: > Hi All, > > Is it possible to integrate RMS 2.0 Office Accounting 2007? > > Wit...

Scenarios Tutorials
Hi everybody, I am new to exceltip forum. I need help on usage of Scenarios in excel. I have tried to find out Tutorials with example for usingh Scenarios but was unable to dig out anything like i found for Pivot tables (i.e. Pivot table 101 etc.) if any body knows nay link where i can have it for free, plz. tell me. I would be greatful to u. thanx in advance. Vikesh --- Message posted from http://www.ExcelForum.com/ There's a Scenario sample workbook on my web site: http://www.contextures.com/excelfiles.html Under the heading 'Scenarios', look for 'Model Pricing S...

Is it possible to use a switchboard/form to open a form from another database?
I want to add a button to my switchboard that opens a form in another database. Is it possible to do this and if so how, as the button wizard only seems to enable actions within the same database. Thanks for any help. -- Sam ...

possibly mangled objects
I was browsing the configuration partition using the softerra's ldap browser and noticed few unreadable values like for example: CN=server name,CN=Servers,CN=our Admin Group,CN=Administrative Groups,CN=our org.name,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=our domain name,DC=com in this container - type - has value that equals: ㉻䨃稳䨃稳䨃稳䨃稳䬂瀹䀉㡱ी欢ཆ㝾匚べ吝ㅸ੃㩳䈋爻䈋爻䈋爻䈋爻䌊 Should that be the case? we are running e2k3 sp2 in a wondows 2000 domain both native -- George I don't believe so. Is there any reason why you would have non Western European Character sets? Does it look th...

Word 2000
I have a word 2000 document here that I need to have 3 different headers for each different section eg: Test Report - Tested to Standard 'A'/Standard 'B'/ Standard 'C' It's a very long document so it isnt practical to head up each page using anything but headers as there is alot of information and certification logos within each header part. Any help on this is very much appreciated. See replies to your previous duplicate question in this newsgroup. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA htt...

Is it possible to bounce unsolicited mail
Is it possible to download headers and then bounce unsolicited mail Regards TIA Jimbo <sa3214 schrieb am 20.01.2005 22:59: > Is it possible to download headers and then bounce unsolicited mail Only possible with OL 2002/2003. If you are using an earlier version you can use a tool like [1] or [2] [1] http://www.scheernet.de/postda/index.html [2] http://www.d-jan.de/mailcheck.html -- Viele Gr��e Christian G�ller "Jimbo @Eclipse.co.uk>" <sa3214<No Spam> wrote in message news:ubFFjtz$EHA.1400@TK2MSFTNGP11.phx.gbl... > Is it possible to download headers an...

Scenarios
Hello, I want to know if it's possible to create charts from the scenario summary report. This summary will be created interactively and I want (somehow) to be able to automatically have a comparison chart too. Thanks for your response! Teresa. ...

Possible Excel bug in matrix product
Hello everybody. I am using Microsoft Excel 2003 on Windows Vista (Italian version). Yesterday I have discovered this problem: if you try to do the product of a matrix of 219 rows and 32 columns with a matrix of 32 rows and 25 columns (using the matrix.product function) you get an error ("A value used in the formula is of wrong data type"). Everything works instead if the first matrix has only 218 rows, so 219 seems to be the critical value (I haven't done other tests to see if the columns number has any influence). Is anybody experiencing the same issue? Clipped from Exc...

How do I find the currently selected Scenario?
Hi, Maybe this is a simple thing, but I don't seem to be able to track it down. I have an Excel sheet with a couple of Scenarios defined. I am trying to implement some VBA functions where I need to know which Scenario is currently selected. Does anyone know how I determine the active Scenario from VBA? Any help will be greatly appreciated. Thanks in advance. Best regards. hi, (?) > Maybe this is a simple thing, but I don't seem to be able to track it down. > I have an Excel sheet with a couple of Scenarios defined. > I am trying to implement some VBA functi...

Open an html page stored ina document library: is it possible?
Hi All, I'm trying to store an html document in a doc library and I'm trying to open that file in the browser... if i refer a link to the document (http://sharepoint/site/DocLibrary/ page.html), instead of open the link in IE, it prompt me to download it... what can I do to fix it?? thanks Vit ...