Hi,

At 03:56 PM 1/2/2006 +0100, Migad Negib wrote:
Hello Alberto Massari,

I'm sorry to disturb you but I'm quite annoyed.

Annoyed by what?

I was looking for a way to retrieve PSVI information in a DOM tree.
In fact, I want to get the AppInfo...

In this case, you should read the thread on the c-users mailing list tht starts from this e-mail http://marc.theaimsgroup.com/?l=xerces-c-users&m=113459059624348&w=2

Hope this helps,
Alberto


Well, I read few things on newsgroup, and I found 2 ways to get this information.

1) Using a PSVIHandler.
I tried with SAX and it works well.
For my application, I am using DOM (XercesDOMParser or DOMBuilderImpl), and It's seems that my handler is never called...
Maybe I'm forgetting something?

2)Getting a DOMPSVITypeInfo Interface from a DOMElement:

I get always a null interface. There's no setFeature() method on XercesDOMParser but the argument is fgXercesDOMHasPSVIInfo !
I think I'm doing something wrong but I don't know what.

I would be very pleased if you can give me a clue.

Thank you.

Migad.


Here is my code.

_parser is a DOMBuilderImpl*

_parser->loadGrammar(file_or_path.data(), Grammar::SchemaGrammarType,
true);

_parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo,
true);

_parser->setValidationScheme(DOMBuilderImpl::Val_Always);

_parser->setDoNamespaces(
true);

_parser->setDoSchema(
true);

_parser->parseURI(_confName.c_str());

if ( ! (_parser->getDocument())) {

throw (std::exception("Unparsed File !!"));}
// then further
DOMPSVITypeInfo* psviType=(DOMPSVITypeInfo*)dom->getInterface(XMLUni::fgXercescInterfacePSVITypeInfo );




Reply via email to