"Jason E. Stewart" <[EMAIL PROTECTED]> asks
> Would dynamic_cast<> be appropriate here?
>
>DOM_Element childElem = dynamic_cast node;
No. The "objects" are actually just smart pointers, and don't
have any virtual functions or access to type information, at
least from the C++ runtime's poin
"Sean Forde" <[EMAIL PROTECTED]> writes:
>
> >
> > I haven't found a good way to do the equivalent of:
> >
> > DOM_Element childElem = (DOM_Element) node;
> >
> > with Xerces-C. I think you could do somehting like:
> >
> > DOM_Element childElem = *((DOM_Element*) &node);
>
The best way might be to get an XMLTranscoder for ISO-8859-1 and transcode
it via that. It will handle those high bit characters and pass the ASCII
subset through unchanged I think. So look at the TransService object which
is a static member of XMLPlatformUtils. Ask it to create you an
XMLTranscod
>How do I stop the SAX Parser from sending me events.
Throw an exception from your SAX event handler. Seriously, that is a
legitimate technique.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
Hi, Emma,
You may paste the follow code into DOMPrint.cpp
/***testing code start ***/
DOM_Document docu = parser->getDocument();
DOM_NodeList nodeList = docu.getElementsByTagName("Event");
DOM_Node tempNode = nodeList.item(0);
DOM_Element newElem = do
Title: How do I prevent SAX parser from sending me events
Either throw an exception not derived from any type
of exception that the parser defines, or use the progressive parse option (see
the PParse example.)
--Dean RoddeyThe CIDLib C++
FrameworksCharmed Quark Softw
I'm working with version 1.4 of xerces and parsing WML files. Looking
around the web, I found a page that causes xerces to behave unexpectedly.
The problem is that it's a straight ASCII file, but with one non-ASCII
character (the character's hex value is A2). When I do a
XMLString::transcode() o
I haven't worked with the C++ version much, but in general the concept
ought to be much the same from one version of the DOM to another. In Java,
it would be roughly as follows. For more detail, see the DOM specification
and/or the XML-DEV mailing list.
parse your document into the DOM, ob
Title: How do I prevent SAX parser from sending me events
Hi,
How do I stop the SAX Parser from sending me events. Assuming that while parsing, I have some data that is not correct and hence I want to abandon the parsing.
How do I do this?
Thanks,
Ganesh
Hi all,
Im having a bit of a problem that hopefully someone will be able to help me with.
I have an xml file similar to the one below:
0
feeder not found
It's safe to change the definition of XMLCh to wchar_t on Solaris, with
one caution: if you ever encounter xml data with a code point (Unicode
character code value) > 64k, there will be a problem. These characters
are stored as a "surrogate pair" of two 16 bit values in utf-16 encoding,
and that
>
> I haven't found a good way to do the equivalent of:
>
> DOM_Element childElem = (DOM_Element) node;
>
> with Xerces-C. I think you could do somehting like:
>
> DOM_Element childElem = *((DOM_Element*) &node);
>
Try this:
DOM_Element childElem = (DOM_Element&)
You just need to transcode it. If transcoding it to the local code page is
sufficient, just use the transcoding methods in XMLString. If you need to
insure that it gets transcoded to a particular encoding, ask the transcoding
service (a pointer to it is in the XMLPlatformUtils class) to create you
A very common pattern (at least in my code) when using Xerces-J's DOM is to do
something like:
for(DOM_Node node = element.getFirstChild();
node != null;
node = node.getNextSibling()) {
if(node.getNodeType() == DOM_Node.ELEMENT_NODE) {
DOM_Element childElem = (DOM_Element) n
It will work. However, if your system's wchar_t expects UTF-32/UCS-4 type
Unicode, i.e. 32 bit size chars, you will get into trouble if any of the
text you parse creates surrogates. A 32 bit Unicode system never expects to
see surrogate pairs, because it doesn't need them. The parser itself will
w
Guys:
I haven't seen this question posted, so I'm sending it to you. Sorry
if this was already answered.
Background:
I'm writing an ODBC api test tool and I'm using Xerces so I just
have to provide the ODBC/SQL behavior, the parsing is provided by Xerces. My
approach is to deleg
I would like to build libxerces-c1_4.so with XMLCh typedef'd for wchar_t
instead of unsigned short. I'd like to know if that is a safe change to make
in
util/Compilers/SunCCDefs.hpp?
I need to do this to avoid conversions between wide strings and DOM_Strings
in my Solaris CC application. I expect
Hi, All.
>Although the build process appears to work correctly and a shared library
>is produced, it doesn't contain all the object files generated under
>obj/SOLARIS. The library I get is only ~3200 bytes in size.
I recall seeing a problem in the makefiles, where make calls a shell
script that
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1069
*** shadow/1069 Wed Mar 21 10:58:49 2001
--- shadow/1069.tmp.25646 Thu Mar 22 07:32:49 2001
***
*** 7,13
| Severity: MinorOS/Version: Linux |
| Priority: Low
Hi William,
It could be a similar problem to one I have seen building Xerces 1.4 on
Solaris 2.7 with Workshop 5.0.
Although the build process appears to work correctly and a shared library
is produced, it doesn't contain
all the object files generated under obj/SOLARIS. The library I get is only
I had sent a roughly equivalent message from another one of my email accounts, but it
didn't seem to hit the list. Sorry if this is a repeat.
Are they any short-term plans for implementing Level 2 events in the Xerces-C DOM?
If not, I might need to undertake an exploratory implementation. W
I am unable to parse a string of xml using xerces c++ 1.4.0
Can anyone please show a code snippet to show me how this is done.
I am trying to convert the following code snippet from Java to c++.
1 String xml = "1234556someValue";
2 SAXParser parser = new SAXParser();
3 parser
22 matches
Mail list logo