Try this path: SAXParser().getScanner().getSrcOffset()
The problem is that the getScanner method is protected. You might
inherit the SAXParser into your own class to get access.
But it should give you the number of characters eaten by the XMLReader.
That is the current fileposition.
/ Erik
> --
Well it looks to me that you are trying to reference a type. Try
referencing an element instead.
Declare a math element in your math scema and reference to it.
http://www.w3.org/2001/XMLSchema";
targetNamespace="http://www.isis.vanderbilt.edu/2004/schemas/math";
xmlns:math="http://www.isis.
ments with no prefix will have an ecb namespace. As a result, the inner 'Cube'
element is invalid. If you change the xmlns declaration to xmlns:eb, and use
the eb prefix with the 'Cube' child element of Envelope, your XML document will
parse fine.
Regards,
Khaled
idator selects the wrong Cube definition. That
suspicion was strengthened after a look at the output from PSVIWriter.
It seems like the system uses the same typedefinition for Cube
disregarding of which context the Cube element occurrs in.
I did a quick edit of the ecb.xsd to use this format
As I said XmlSpy regards the data as valid but Xerces tells me that Cube
is not valid content to envelope. I can't figure out what the problem
is. Any help would be greatly appriciated.
Best regards
Erik Rydgren
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
No there is only one namespace for the whole Xerces package.
I just realized that I wrote the wrong namespace for you last time. It
should have been XERCES_CPP_NAMESPACE and not XALAN_CPP_NAMESPACE.
Sorry. My bad.
/ Erik
> -Original Message-
> From: Andre Stock [mailto:[EMAIL PROTECTED]
>
The default handler is only a stub interface (it does nothing). As you
suggested you'll have to inherit the DefaultHandler and override the
methods you need.
/ Erik
> -Original Message-
> From: Andre Stock [mailto:[EMAIL PROTECTED]
> Sent: den 11 juni 2004 09:37
> To: [EMAIL PROTECTED]
>
Your XML file actually looks like this in a DOM tree.
Relation - ELEMENTNODE
Whitespace - TEXTNODE
Subtype - ELEMENTNODE
Whitespace - TEXTNODE
The endlines in your document is stored inside the DOM tree as well. You
can filter them out using a DOMTreeWalker.
Regards
/ Erik
> -Original
// Obtain list of child nodes
>
>cChildNodeList = cXMLNodeList->item(i)->getChildNodes();
>
>
>
>// Loop through all child nodes
>
>for (int j = 0; j < cChildNodeList->getLength(); j++)
>
>{
>
> strcpy(name,
> XMLStri
Can you please provide a snippet of your DOM tree traversing code. It is
hard to see what the problem is if we do not know what you are doing.
Regards
Erik
> -Original Message-
> From: Nath [mailto:[EMAIL PROTECTED]
> Sent: den 25 maj 2004 19:07
> To: [EMAIL PROTECTED]
> Subject: Repost:
dll) : error LNK2005: __stricmp already defined
in
> > >libcmt.lib(stricmp.obj)
> > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: __strnicmp already
> > defined in
> > >libcmt.lib(strnicmp.obj)
> > >LINK : warning LNK4098: defaultlib 'MSVCRT' conflict
We use .NET now but we used VS6 before. Changing from dll to static lib
is done in project settings -> General -> project defaults ->
Configuration type.
/ Erik
> -Original Message-
> From: Adam Heinz [mailto:[EMAIL PROTECTED]
> Sent: den 26 februari 2004 21:29
> To: [EMAIL PROTECTED]
> S
X unless all of your libraries
> (including libgcc.a) have also been compiled with -static."
> If the xerces and xalan projects are not self-contained, this could be
> a static-killer.
>
> -Mark
>
>
>
> On Feb 26, 2004, at 2:29 AM, Erik Rydgren wrote:
>
> >
I recommend static linkage if you want a small footprint. Static linkage
does only bring in what you actually use.
/ Erik
> -Original Message-
> From: Mark Goldstein [mailto:[EMAIL PROTECTED]
> Sent: den 26 februari 2004 02:01
> To: [EMAIL PROTECTED]
> Subject: optimizing the xerces libra
USE_WIN32_MESSAGELOADER.
- Change the defines for PLATFORM_EXPORT and PLATFORM_IMPORT by removing
the _declspec(dllexport) and _declspec(dllimport)
- Rebuild.
Hope I didn't forget anything.
Good luck
Erik Rydgren
Aptic AB
Sweden
> -Original Message-
> From: Chaudhuri, Hiran [mailto:[EMAIL PROTEC
7;t mix them.
>
> So, either:
> a) turn off schema caching,
> b) use different DOMBuilder/DOMParser to parse XML documents using
> different schemas
> c) use a targetNamespace in your schemas
>
> Alberto
>
> At 14.42 05/02/2004 +0100, Erik Rydgren wrote:
> >We have j
idea when
using namespaces but it doesnt work for the default namespace.
I probably don't see the whole picture here, but why hash on the target
namespace and not the systemid of the loaded schema document?
Erik Rydgren
Software engineer
Aptic AB
Kåsatorpsvägen 5
SE 541 34 SKÖVDE
Sweden
tfn:
is at the
same time but I seem to have forgotten to submit it. Could someone
please revise and commit the following code?
Best regards
Erik Rydgren
Software engineer
Aptic AB
*** CODE
void DOMNodeImpl::setTextContent(const XMLCh* textContent){
DO
What version of the parser do you use? The getTextContent method wasn't
implemented up to the 2.3.0 version. Using the current implementation I
have no problems reading the text content of an element containing
CDATASections.
/ Erik
> -Original Message-
> From: Thomas Zabel [mailto:[EMAIL
There is only one mailing list, this one. Users are welcome to post
implementation questions here but please read the FAQ and look at the
examples before posting. Thank you.
/ Erik
> -Original Message-
> From: Purdy, Edgar M [mailto:[EMAIL PROTECTED]
> Sent: den 26 november 2003 20:16
> T
Well Gareth now you have to read your own code a bit. ;)
The replaceChild method on document level works like a charm for
replacing the document root element against another element node.
Best regards
Erik Rydgren
> -Original Message-
> From: Gareth Reakes [mailto:[EMAIL PRO
Title: Document root node
Nothing
to it, use the method replaceChild on the DOMDocument.
/ Erik
-Original Message-
From: Milan Tomic [mailto:[EMAIL PROTECTED]
Sent: den 24 november 2003 14:00
To: Xerces-C
Subject: Document root node
How can I replace docum
Not a command, it is a class. Derive from EntityResolver. Implement the
resolveentity method. Connect your resolver to the parser and you are
good to go. If your resolver doesn't provide an InputSource then the
parser will fallback to the default behavour. Validating a document that
doesn't have a
Well I have no problems replacing a document root with the 2.2.0
codebase. I use the following code. The code is pure DOM so no extra
fancy stuff, don't mind the wrapper classes.
cDocument* poDoc1 = GetDOMImplementation().CreateDocument("", "test",
NULL);
cDocument* poDoc2 = GetDOMImplementation()
Parsing BIG files is usually a job for the
SAX interface. SAX doesn’t create any internal data structure at all so
it is up to you to store the important information in a memory efficient way.
/ Erik
-Original Message-
From: Yang Wen
[mailto:[EMAIL PROTECTED]
Sent: den 8
t;
>
> Thank you for your help. I finally succeded to make it work.
>
> Does Xerces supports XML Schema and/or DTD validation?
>
> Best regards,
> Milan
>
>
>
> -Original Message-
> From: Erik Rydgren [mailto:[EMAIL PROTECTED]
&
ct: RE: Parser
Thank you for your help. firstChild() works well, but nextSibling()
returns NULL, altough there is more then 1 node. :(
Best regards,
Milan
-Original Message-
From: Erik Rydgren [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 2:48 PM
To: [EMAIL PRO
ing::release(&strValue);
}
It iterates through ALL
nodes in the document, but it should show only child nodes (elements) of root
node.
Thanks.
Milan
-Original Message-
From: Erik Rydgren
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, Nov
27;d like to see
only real elements (i.e. ), nothing else.
Thank you.
-Original Message-
From: Erik Rydgren
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003
2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: Parser
Use the createTreeWalker
method or create
.
> easiest is to create a tree iterator that doesn’t show text
nodes while traversing the DOM tree.
How can I do that?
Milan
-Original Message-
From: Erik Rydgren
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003
12:58 PM
To: [EM
Title: Parser
That
is standard DOM behavior. The carage-return line-feed characters you have mixed
into the XML are treated as non ignorable text content. Hence text nodes are
created.
There are several ways to solve your
problem but the easiest is to create a tree iterator that doesn’t s
arse an invalid xml file
>
>
> yes, domcount app. crashes upon parsing as well.
>
> Regards,
> Xuefu
>
>
>
> "Erik Rydgren"
> <[EMAIL PROTECTED] To: [EMAIL PRO
Input of malformed xml should neither throw nor crash. The parse method
should only return false and the error is reported through the
registered error handler.
Have you initialized Xerces before using any of the classes? Are you
linking with the correct runtime? Try parsing your input document wi
There was a bug in the file output source which made the system work
unbuffered against the disc. Flushing after every single byte is SLOOOW.
Try out the latest build.
/ Erik
> -Original Message-
> From: Jarle Aase [mailto:[EMAIL PROTECTED]
> Sent: den 11 oktober 2003 04:51
> To: [EMAIL
There was a bug in the file output source which made the writing REALLY
slow (no buffering). I can't remember which version it was fixed in but
I know it is fixed in the last version released. Why not try that one
out?
/ Erik
> -Original Message-
> From: Patrick Blanchette [mailto:[EMAIL
Nope the penalty for using document fragments is very low. The fragment
has to be allocated / deallocated of course and there will be an extra
node insert performed. So the price is low. However if you construct
many fragment the overhead will be noticeable. And if you construct a
fragment for each
way to make the #xA character pass through the
parser unharmed? I don’t have a grammar and I don’t have the option
of adding one either.
Regards
Erik Rydgren
Mandarin FS
Sweden
No, all requests for external entities are routed through your entity
resolver. Just have the resolver return an inputstream pointing to a
local file representing the URL. The parser will only try to open the
URL if the entityresolver doesn't provide an inputsource.
/ Erik
> -Original Message
You will have to write an EntityResolver and jack it into the parser.
I believe there is an example that shows how to do it.
Best regards
Erik Rydgren
Mandarin FS
Sweden
> -Original Message-
> From: Ilan Nehama [mailto:[EMAIL PROTECTED]
> Sent: den 18 september 2003 09:57
>
alize the node yourself. Look in the examples for
code.
Best regards
Erik Rydgren
Mandarin FS
Sweden
> -Original Message-
> From: Hieu Bui [mailto:[EMAIL PROTECTED]
> Sent: den 16 september 2003 16:52
> To: [EMAIL PROTECTED]
> Subject: xerces 1.6.0 questions
>
>
rocess node
break; // No need to search for more inner nodes
}
}
pInnerNode = pInnerNode->getNextSibling(); // <-- this one
}
}
pNode = pNode->getNextSibling();
}
/ Erik
> -Original Message-
> From: Erik Rydgren
> Sent: den 15 september 2003 10:13
>
}
But if you know that you'll never will see other nodes than PatchData
nodes under the rootnode you don't have to compare tagname for those
either.
Regards
Erik Rydgren
Mandarin FS
Sweden
> -Original Message-
> From: David Hoffer [mailto:[EMAIL PROTECTED]
> Sent
Exchange isn't a mailserver, it is a torture device.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
test
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]; Erik Rydgren
> Subject: Re: linkproblems
>
> On Wednesday 16 July 2003 13:37, Erik Rydgren wrote:
> > Just feed the linker the required libraries and these errors should
go
> > away.
>
> I fear that the problem might be more complicated than it
t;parse() question
>
>
> In continuation of my public humiliation thread ;-)
>
> I can't find the implementation of DOMNode::release()
>
> I can find DOMNodeImpl::release() and many others...but not
> DOMNode::release()
>
>
>
> |-----+----
Nahh. Just look at the DOMNode::release functionality and un-nest the
code from there. I'm sure you'll figure it out.
/ Erik
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: den 16 juli 2003 16:44
> To: [EMAIL PROTECTED]
> Subject: RE: parser->parse() quest
No the parser never throws on invalid input. The parser calls the
errorhandler, aborts the parse and returns false. If you want the parser
to throw an exception then you'll have to throw the exception in the
errorhandler.
/ Erik
> -Original Message-
> From: Suchit Batheja [mailto:[EMAIL P
lem is that the dependencies comes from
libxerces-
> c.so.22,
> so I must know exactly what shared libary they depend on and make sure
> that I
> have them installed and that I can link with them?
>
> //daniel
>
>
> Erik Rydgren (2003-07-16 13:37):
> >A shared library
A shared library never includes dependencies. It would go against its
very purpose, to provide a library of code that an application can use
parts of. Which external libraries that is required for a specific
purpose is not known until you actually link a complete application.
Just feed the linker
Yes I believe that you can but you'll have to remove the sourcefiles one
by one yourself. There is no switch for the makefile or anything else
simple.
If I were you I would start out with the utils, platform support,
internal, DOM (dump the deprecated stuff, take just impl) and then add
any other f
I would guess that the whole subtree is released but to be sure you'll
have to read the large documentation (the one that starts with the
function main). Oh the wonderful world of open source... :)
/ Erik
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: den
|
> |
> |
> | To: <[EMAIL PROTECTED]>,
> <[EMAIL PROTECTED]>
> |
> | cc:
> |
> | Subject: Re: parser->parse() question
> |
>
>-------
>
You need to set an errorhandler. The parser reports all document errors
to an errorhandler. Just inherit the class ErrorHandler and implement
the virtual methods. Then create an instance of your ErrorHandler and
connect it to the parser with the setErrorHandler method.
/ Erik
> -Original Mess
ilto:[EMAIL PROTECTED]
> Sent: den 14 juli 2003 21:38
> To: [EMAIL PROTECTED]
> Subject: RE: parser->parse() question
>
>
> Would it acceptable to use resetDocumentPool()? Or is resetPool()
> superior
> in some way?
>
>
>
>
>
> |-+-------
etNextSibling();
}
}
As I said. This is usually best done in Xalan but if you need a small
footprint and can't handle the overhead applied by Xalan then do it in
DOM.
But Xalan WILL make your application more flexible and easier to
maintain when requirements change.
Regards
Erik Rydgren
Gareth, you forgot to mention that the first document is still valid
after a reset. The parser keeps the document in an internal list until
the parser is deleted or the method resetPool is called on the parser.
Do a reset before each parse and smile just like Gareth says unless you
REALLY want to
ngLength+1) *
sizeof(XMLCh));
getTextContent(pzBuffer, nStringLength);
pzBuffer[nStringLength] = 0;
return pzBuffer;
}
Regards
Erik Rydgren
Mandarin IT
Sweden
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: den 11 juli 2003 21:54
> To: [EMAI
> As far as i know the DOM core level 3 is released and being usedis
> there
> any support for this in Xerces C++ to validate a subtree
>
> -Original Message-
> From: Erik Rydgren [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 6:31 PM
> To: [
The sad answer is: you can't.
Validation of a DOM tree is DOM core level 3 which is still in working
draft. It is definitely planed to be implemented. But when? I don't
know.
Regards
Erik Rydgren
Mandarin IT
Sweden
> -Original Message-
> From: Paramdeep Ahuja [mailto:
hild();
while ( node != null ) {
node.setNodeValue(value);
node = node.getNextSibling();
}
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
- .H file -
//
//
**
Every pointer that is returned is owned by the document. You shouldn't
deallocate them.
regards
/Erik
-Original Message-
From: Colin Paul Adams [mailto:[EMAIL PROTECTED]
Sent: den 2 juni 2003 16:52
To: [EMAIL PROTECTED]
Subject: Ownership of const XMLCh *
When a method such as DOMNode::
With a quick look it seems like it is the same object that is returned.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: den 29 maj 2003 22:39
To: [EMAIL PROTECTED]
Subject: DOMNode::removeChild(oldChild) etc
Frell! (*slaps myself for using Farcape reference*)
I read the specification again. And I think I got it this time.
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#Node3-textC
ontent
"When it is defined to be null, setting it has no effect."
Content is defined to be null for DO
re it is in the
normal format: Compiled but untested. Please verify. I had one issue though
and it is commented in the code.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
void DOMNodeImpl::setTextContent(const XMLCh* textContent){
if (textContent != NULL) {
if (isRea
Well no. Xerces does not support XPointer.
And me personally doesn't know any other cross platform XML parser that
does.
Anyone else that does?
/ Erik
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: den 3 april 2003 15:51
To: [EMAIL PROTECTED]
Subject: does Xer
ike it was designed to be scripted isn't it? :)
Combined with funtion level linking you will end up with the smallest binary
image you can get because only those functions that you actually use is
linked in from Xerces.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
o put the method in the impl file and cast down to it.
Gareth
On Wed, 2 Apr 2003, Erik Rydgren wrote:
> I agree that this is a good way of providing both functionalities and it
> actually made implementation a bit easier.
> I took the liberty to write the whole shabang down in code.
>
.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
--- CODE ---
const XMLCh* DOMNodeImpl::getTextContent(XMLCh* pzBuffer, unsigned int&
rnBufferLength) const
{
unsigned int nRemainingBuffer = rnBufferLength;
rnBufferLength = 0;
if (pzBuffer)
*pzBuffer = 0;
DOMNode *this
I agree, I like consistency.
Let's register the string into the document by allocating the memory on the
documents heap.
Although, the result can be very large. Should we allow the user to release
the memory when not used anymore? How?
/ Erik
-Original Message-
From: Gareth Reakes [mailto
PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Implementing getTextContent
Hi,
Eric is correct. Take a look at
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#Node3-t
extContent
for a more full explanation of what the method should do.
Gareth
On Mon, 31 Mar 2003, Erik Rydgren wro
Using my best judgement I'd have to say yes. CDATA section should also be
included. CDATA nodes is only a specialization of text nodes to prevent
parsing of markup.
/ Erik
-Original Message-
From: Magnus Strand [mailto:[EMAIL PROTECTED]
Sent: den 31 mars 2003 16:26
To: [EMAIL PROTECTED]
ed to implement a reader/writer lock to protect your document if
you'll want access to a document from multiple threads.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Bagepalli, Kiran [mailto:[EMAIL PROTECTED]
Sent: den 29 mars 2003 02:36
To: '[EMAIL PROT
currentNode = nodeIterator.nextNode();
}
}
return pzContentStr;
}
This of course forces the user to delete the returned string, which is
non-standard behavour.
BTW, this is completly untested code. It compiles but not more.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Messag
eventhandler.
In the eventhandler do your extended validations.
If valid, add the element to a document tree (hence build your own
DOMDocument with the standard DOMDocument API)
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Bagepalli, Kiran [mailto:[EMAIL
You need to cast it to an DOMElement*, see below.
// Erik
-Original Message-
From: Erik Rydgren [mailto:[EMAIL PROTECTED]
Sent: den 24 mars 2003 14:02
To: [EMAIL PROTECTED]
Subject: RE: parsing DOM tree: How to get attribute values
Oh THAT! :)
Just cast your DOMNode* to a DOMElement*. I
Oh THAT! :)
Just cast your DOMNode* to a DOMElement*. If you are paranoid then you can
do a check that the node really is an element.
DOMElement poElement = NULL;
if (poNode->getType() == ELEMENT_NODE)
poElement = static_cast(poNode);
Regards
Erik Rydgren
Mandarinen systems AB
Swe
e("min"));
const char* pzMax =
XMLString::transcode(poElementLength->getAttribute("max"));
// use the values
delete pzMin;
delete pzMax;
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Andreas B. Thun [mailto:[EMAIL PROTECTED]
Sent: den 24 mars 20
at a
given time.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Shirish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: den 19 mars 2003 08:48
To: [EMAIL PROTECTED]
Subject: To access DOMParser object from EntityReolver
Hi,
The xerces DOMParser is observed to b
This is a known bug which has been fixed. I'm not sure in which version the
patch first appered.
It should be in the latest stable build (2.2) though. Download and try it
out.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Mark Van Orman [mailto:[
Yes the doctype must be specified in the XML file to be able to be loaded by
a validating parser. It is XML standard.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Raghu Nandan [mailto:[EMAIL PROTECTED]
Sent: den 3 mars 2003 22:23
To: [EMAIL PROTECTED
Take a look at the getElementsByTagNameNS method.
A simple getElementsByTagNameNS("*", "alarm") would suffice.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Axelle Apvrille (LMC) [mailto:[EMAIL PROTECTED]
Sent: den 28 februari 2
element. This will
make the document almost unreadable for a human eye though.
Another way is to create a TreeWalker/TreeIterator that filters out all
textnodes during traveral of the DOMDocument or diong it manually by
checking the nodeType() for each node you process.
Regards
Erik Rydgren
Mandarinen
lease function instead.
Those who need brutal performance can still use the
DOMDocumentImpl::createDocumentType() - DOMDocumentImpl::setDocumentType()
combo.
Suggestions? Flames? Anyone who want to send me the biggest fryingpan in the
cupboard to swat bugs with?
Regards
Erik Rydgren
Mandarinen s
c1 to doc2
doc1_root = doc1.getDocumentElement();
doc2_root = doc2.getDocumentElement();
cloned_nodes = doc2.importNode(doc1_root, true); // Deep node tree cloning
doc2_root.appendChild(cloned_nodes);
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Williams, R
++ i
do not know. You will just have to test it.
http://xml.apache.org/dist/xerces-c/stable/xerces-c2_2_0-linux7.2Proton.tar.
gz
If it isn't then compiling Xerces source with gcc should be a breeze.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Esther Par
gain using another parser.
(BBTW, I think we might be able to make MemBufFormatTarget Class a little
(Bfaster if we use 'realloc()' instead of 'new', 'delete', and 'memcpy()'. I
(Bdo hope they will add this feture the next time.
(B
(BBest Regards
(B
(BLei
Take a look at the EntityResolver functionality.
An entityresolver translates public and system id's to InputSources for the
parser to use.
In other words, you can store the DTD anyway you want. Filesystem, database,
resource... only you set the limit.
/ Erik
-Original Message-
From: Sven
Take a look at the class SAXPrintHandlers. It does just that. It writes
(Bnodes to a XMLFormatter from SAX interface calls.
(BI think the easiest way for you to go is to inherit the class
(BSAXPrintHandlers into you own class and override those methods you need
(B(startElement, endElement and s
Well your program doesn't seem to need the actual XML functionality but
rather a log. Why not just barf out the file in a non valid format like:
It is not parsable as a file like this but if you just put the xml
declaration and a root node starttag and endtag on it then the fi
Yes this is exactly what the EntityResolver is for.
Usage:
Override the EntityResolver class.
Implement the ResolveEntity method.
Return a InputSource for a known entity or return null to use the normal
Xeces behavour.
Create an instance of your EntityResolver and plug it into the parser with
the
The entity resolver is a functionality actually stolen from SAX to DOM and
if I'm not mistaken it is proposed as a DOM standard as well.
It is not DOM standard yet, but it has been a part of Xerces DOM for a long
time.
Lemme check how you can plug it in...
*lots of muffled dissorganized searching*
hanging by a thin thread. If I need the performance
then the DTD gets axed in a heartbeat (we also have a controlled environment
and I have yet to see a corrupted package)
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Bagepalli, Kiran [mailto:[EMAIL PROTECTED
t ourselves and this is one piece of code I do not
have to look at anymore.
Although it contains classes that I will not give to you (cXMLString is to
large), but it is an easy modification to make it work.
Regards
Erik Rydgren
Mandarinen sy
Damn! I was to slow typing this. First thing I saw after I sent it was that
someone else had given the same answer and code to come with it!
Man I do LOVE this mailing list :)
/ Erik
-Original Message-
From: Erik Rydgren [mailto:[EMAIL PROTECTED]]
Sent: den 9 januari 2003 19:01
To
user traverses the whole tree and hence you
will have to create and hold the whole tree in memory.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message-
From: Alan LaViolette [mailto:[EMAIL PROTECTED]]
Sent: den 9 januari 2003 17:42
To: [EMAIL PROTECTED]
Subject: Dom Bridge
Yes you can use the caching in the parser. And frankly it is THE way to go,
if you like speed that is :)
Simplest way to go:
poParser->setFeature(XMLUni::fgXercesCacheGrammarFromParse, true);
Then use the same parser for all parses (do not delete it).
The grammar will be cached on the first pars
The difference is that the XercesDOMParser is a little bit more low level.
But if you want to be more W3C DOM level 3 compliant then use the
DOMBuilder.
The only added functionality for you in the XercesDOMParser as I suggested
was the adoptDocument which removes your need for a document clone.
The
> > Check a known bug in hangon... *much muffled noises and irrational
> > searching*
> >
[ CODE REMOVED ]
> I changed that line of code and now everything works OK :-)
> THANK YOU! You saved my day (and my paper :-)
No worries mate. But you are lucky. The reason that I could identify the
pro
now trashes.
It should be this instead.
internalSubset = docImpl->cloneString(internalSubset);
Then you will get your SYSTEM identifiers back.
PS: This was fixed quite a while ago and is present in the nightly build.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden
-Original Message
1 - 100 of 197 matches
Mail list logo