473,394 Members | 1,671 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,394 software developers and data experts.

Problem with ISAXXMLReader

CoInitialize(NULL);
ISAXXMLReaderPtr pReader = NULL;

CHR(pReader.CreateInstance(__uuidof(SAXXMLReader)) );

A1ContentHandler * pA1ContentHandler = A1ContentHandler::CreateInstance();
CHR(pReader->putContentHandler(pA1ContentHandler));
SaxErrorHandlerBase * pErrHndlr = new SaxErrorHandlerBase();
CHR(pReader->putErrorHandler(pErrHndlr));

CHR(pReader->putFeature(L"exhaustive-errors", VARIANT_TRUE));
------------------------------------------------------------------------
CHR is a macro to check the return value of the function.
pReader->putFeature() returns 80070057.

What am I doing wrong?
Thanks.
CB
Nov 12 '05 #1
4 3731
Hi CB,

As for the error you get on calling the "putFeature" method of the
SaxXmlReader, I've also done some tests on my side and also encountered the
problem. I've done the test in both C++ AND VB and try most of the feature
keys listed in the following reference:

#SAX Reader Features
http://msdn.microsoft.com/library/de...us/xmlsdk/html
/sax_reader_features.asp

And it seems that some of them always return the "InvalidArg" error (just
the 80070057 you mentioned).
I'm not sure whether this is the document's error or there is anything else
concerned with the setting. Currently I'm consulting some further experts
and will let you know if there is any new findings. Thanks for your
understanding.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 12 '05 #2
I just found in the MSDN Library that ISAXXMLReader::putFeature(), called
with "exhaustive-errrors" or "schema-validation", returns E_FAIL.
What does that mean? That those features can't be set?
If you can set "schema-validation", what sort of sense does it make to
return E_FAIL? And if something goes wrong, how could you tell?

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:mq*************@cpmsftngxa10.phx.gbl...
Hi CB,

As for the error you get on calling the "putFeature" method of the
SaxXmlReader, I've also done some tests on my side and also encountered the problem. I've done the test in both C++ AND VB and try most of the feature
keys listed in the following reference:

#SAX Reader Features
http://msdn.microsoft.com/library/de...us/xmlsdk/html /sax_reader_features.asp

And it seems that some of them always return the "InvalidArg" error (just
the 80070057 you mentioned).
I'm not sure whether this is the document's error or there is anything else concerned with the setting. Currently I'm consulting some further experts
and will let you know if there is any new findings. Thanks for your
understanding.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 12 '05 #3
Hi CB,

Thanks for your followup. As for the ISAXXMLReader and SAXXMLReader's
putFeatures, I've also checked the documentations (online MSDN and local)
and done some tests on my side. It seems that the documentation has some
problems on the description. In the document, it said that those features
such as

exhaustive-errors
external-general-entities
external-parameter-entities
namespaces
namespace-prefixes
parameter-entities
preserve-system-identifiers
prohibit-dtd
schema-validation
server-http-request

#putFeature Method
http://msdn.microsoft.com/library/de...us/xmlsdk/html
/isaxxmlreader_interface.asp

Requires MSXML3 OR later version. But my test show that the
"exhaustive-errors" feature is only supported by MSXML 4 and above. So
we'd change the code as :

HRESULT hr = CoCreateInstance(__uuidof(SAXXMLReader40),
NULL,
CLSCTX_ALL,
__uuidof(ISAXXMLReader),
(void **)&pRdr);

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 12 '05 #4
Thanks, Steven, it seems to be working with msxml 4.

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:$R**************@cpmsftngxa06.phx.gbl...

Requires MSXML3 OR later version. But my test show that the
"exhaustive-errors" feature is only supported by MSXML 4 and above. So
we'd change the code as :

HRESULT hr = CoCreateInstance(__uuidof(SAXXMLReader40),
NULL,
CLSCTX_ALL,
__uuidof(ISAXXMLReader),
(void **)&pRdr);

Nov 12 '05 #5

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

Similar topics

0
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: FS Liu | last post by:
Hi, In my current ATL server project, I have to parse the input in the client application's request to find out the different combination of parameters, instead of using SOAP. For this reason,...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
0
by: Aslane | last post by:
I have followed the Sax2 JumpStart example (http://msdn2.microsoft.com/en-us/library/ms994335.aspx), to implement a xml Parser in my project. The projects uses DirectX to create a device and use it,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.