Re: How to read an XML file in Visual C++ 6

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



See below...
On Sat, 5 Dec 2009 14:56:09 -0000, "David Webber" <dave@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:



"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:mmrkh5t8124ut0glkovs5sduuo024k51kk@xxxxxxxxxx

Why would you need an open network connection to validate against a DTD?

First, the DTD could be part of the XML file itself

It could be in your resources

It could be a file on the user's machine

Personally, I'd vote for putting it in the resources.

Because the musicXML data files, which are passed over the internet, start
with things like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0
Partwise//EN"
"http://www.musicxml.org/dtds/partwise.dtd";>

****
It is really critical that a program I use (such as yours) be usable in any venue under
any conditions. I mostly use it when I'm traveling, which means I'm at 35,000 feet over
Utah or I'm in some motel somewhere without connectivity. My world has to be completely
self-contained on my machine. I do not consider it reasonable to require Internet
connectivity for doing simple tasks. Such as opening and reading a file.

It makes no sense to put a remote URL into a file which is going to be used locally.

In fact, I question whether or not it EVER makes sense to allow my machine to go out to
connect to a URL. The server has to be able to support every request, and in any case, is
it not a violation of privacy?
joe
****
I'd be very happy to keep a local copy of the DTD in the resources of the
DLL import module, but I didn't find a way to tell it to use that instead of
the DTD prescribed in the XML file. Am I missing something obvious?

Dave
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: How to read an XML file in Visual C++ 6
    ... "Joseph M. Newcomer" wrote in message ... I'd vote for putting it in the resources. ... I'd be very happy to keep a local copy of the DTD in the resources of the DLL import module, but I didn't find a way to tell it to use that instead of the DTD prescribed in the XML file. ...
    (microsoft.public.vc.mfc)
  • Re: JNLP validation
    ... and ran in through the DTD->XSD converter athttp://www.hitsw.com/xml_utilites/ ... I then I tried validating one of my JNLP files. ... are not supposed to nest <java inside <resources which Sun's example ... DTD - the XML document itself is not 204 lines long, ...
    (comp.lang.java.programmer)
  • Serializing from XML with remote DTD
    ... I have an XML file which I am serializing into a class using the ... the XML file has a dtd in it that points to a remote ... mean, it's not trying to validate it, so why ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Convert flat file to XML document
    ... >I am a newbee and have a comma seperated flat-file and a DTD. ... >XML file as per the the definition in the DTD. ... As required add extra processing to your program so that you can ... The ultimate truth is that there is no ultimate truth ...
    (microsoft.public.dotnet.languages.csharp)
  • How to get Java to read in XML file and parse it against DTD?
    ... When using Java to read in an XML file, ... the XML file to be parsed against the specified DTD. ... I have an existing Java application that allows users to modify values ...
    (comp.lang.java.programmer)