Click here to Skip to main content
16,008,490 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: splitting view Pin
Weiye Chen12-Aug-02 22:05
Weiye Chen12-Aug-02 22:05 
GeneralRe: splitting view Pin
wong190712-Aug-02 22:23
wong190712-Aug-02 22:23 
Generalscroll bar Pin
wong190712-Aug-02 15:47
wong190712-Aug-02 15:47 
GeneralRe: scroll baR Pin
Christian Graus12-Aug-02 16:06
protectorChristian Graus12-Aug-02 16:06 
GeneralRe: scroll bar Pin
wong190712-Aug-02 16:23
wong190712-Aug-02 16:23 
GeneralRe: scroll bar Pin
Christian Graus12-Aug-02 17:09
protectorChristian Graus12-Aug-02 17:09 
GeneralRe: scroll bar Pin
wong190713-Aug-02 3:01
wong190713-Aug-02 3:01 
GeneralXML parser not validating on load Pin
paulb12-Aug-02 14:37
paulb12-Aug-02 14:37 
I am attempting to load an XML file using the DOMDocument 'load' method of the MSXML parser but it does not seem to be validating the file against the schema. The document will load ok and is even checked for correct XML syntax but doesn't validate against the schema.

Here is an outline of the code:


#import "msxml3.dll"

IXMLDOMDocumentPtr spDoc;
hr = spDoc.CreateInstance(__uuidof(DOMDocument));
if (FAILED(hr))
{
return 0;
}


// These properties are supposed to be set by default
// but just in case I make sure they are.
hr = spDoc->put_resolveExternals(VARIANT_TRUE);
if (FAILED(hr))
{
return 0;
}
hr = spDoc->put_validateOnParse(VARIANT_TRUE);
if (FAILED(hr))
{
return 0;
}

// Load and parse the input XML file.
_variant_t vFile(lpszXMLFile);
VARIANT_BOOL bSuccess = false;
hr = spDoc->load(vFile, &bSuccess);
if (FAILED(hr) || !bSuccess)
{
return 0;
}


The reference to the schema in the input XML file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<FreshItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Visual Studio Projects\Wcpw\Debug\FreshItem.xsd">

I suspect it is something to do with the reference to the schema since if I edit this to put in some bogus path it will still succeed to load, it looks like it is ignoring the schema reference altogether.

GeneralWhat's wrong with my DCs Pin
CaesarCZ12-Aug-02 14:26
CaesarCZ12-Aug-02 14:26 
GeneralRe: What's wrong with my DCs Pin
Christian Graus12-Aug-02 15:01
protectorChristian Graus12-Aug-02 15:01 
GeneralRe: What's wrong with my DCs Pin
CaesarCZ12-Aug-02 15:16
CaesarCZ12-Aug-02 15:16 
GeneralRe: What's wrong with my DCs Pin
Christian Graus12-Aug-02 15:42
protectorChristian Graus12-Aug-02 15:42 
GeneralRe: What's wrong with my DCs Pin
CaesarCZ13-Aug-02 1:05
CaesarCZ13-Aug-02 1:05 
GeneralRe: What's wrong with my DCs Pin
Joel Lucsy13-Aug-02 5:39
Joel Lucsy13-Aug-02 5:39 
GeneralRe: What's wrong with my DCs Pin
CaesarCZ13-Aug-02 10:13
CaesarCZ13-Aug-02 10:13 
GeneralOnSysCommand - cant find it in ClassWizard Pin
ns12-Aug-02 14:13
ns12-Aug-02 14:13 
GeneralRe: OnSysCommand - cant find it in ClassWizard Pin
567890123412-Aug-02 19:25
567890123412-Aug-02 19:25 
GeneralFound it, but which class should have the handler? Pin
ns13-Aug-02 2:53
ns13-Aug-02 2:53 
GeneralRe: Found it, but which class should have the handler? Pin
567890123413-Aug-02 3:02
567890123413-Aug-02 3:02 
GeneralRe: OnSysCommand - cant find it in ClassWizard Pin
ns13-Aug-02 3:30
ns13-Aug-02 3:30 
GeneralRe: OnSysCommand - cant find it in ClassWizard Pin
Bijesh13-Aug-02 6:28
Bijesh13-Aug-02 6:28 
GeneralRe: OnSysCommand - cant find it in ClassWizard Pin
ns13-Aug-02 7:51
ns13-Aug-02 7:51 
GeneralRe: OnSysCommand - cant find it in ClassWizard Pin
Bijesh13-Aug-02 8:18
Bijesh13-Aug-02 8:18 
Generalexcept my member pointers Pin
ns13-Aug-02 8:30
ns13-Aug-02 8:30 
GeneralDefault font for dialogs in EVC resource editor... Pin
Wes Jones12-Aug-02 14:11
Wes Jones12-Aug-02 14:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.