DO NOT REPLY [Bug 7022] New: - DOMString::transcode ( and XMLString::transcode() ) fails on SuSE LINUX 7.3 for non UTF-8 Strings

2002-03-11 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7022

DOMString::transcode ( and XMLString::transcode() ) fails on SuSE LINUX 7.3 for non 
UTF-8 Strings

   Summary: DOMString::transcode ( and XMLString::transcode() )
fails on SuSE LINUX 7.3 for non UTF-8 Strings
   Product: Xerces-C++
   Version: 1.6.0
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Utilities
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


DOMString::transcode ( and XMLString::transcode() ) fails on Linux ( SuSe 7.3 )
with
special characters if locale is not UTF-8.
The Problem seems to be mbstowcs() used by transcode();
mbstowcs( NULL, "Español", 0) returns -1 if the editor is not UTF-8.

Example:

#include 

#include 
#include 

int
main (int argc, char** argv)
{
  XMLPlatformUtils::Initialize();
  DOMString domString( "[°C]" );
  char *c = 0;
  c = domString.transcode();
  cout << "transcode() : " << c << endl; 
}

compiled on SuSE LINUX 7.3 , g++ 2.95.2

g++ -g -I/usr/opt/xalan-c-1_3/c/src -I/opt/xerces-c-1_6_0/include  -c
transcode.cc -o transcode.o
g++ -o transcode transcode.o -L/usr/opt/xalan-c-1_3/c/lib
-L/opt/xerces-c-1_6_0/lib -lxalan-c1_3 -lxerces-c1_6_0 -lm -lpthread 
%
./transcode 
transcode() : 
%

compiled on compaq true64 V5.1

cxx -g -I/usr/opt/xalan-c-1_3/c/src -I/usr/opt/xerces-c-1_6_0/src  -c
transcode.cc -o transcode.o
cxx -o transcode transcode.o -L/usr/opt/xalan-c-1_3/c/lib
-L/usr/opt/xerces-c-1_6_0/lib -lxalan-c1_3 -lxerces-c1_6_0 -lm -lpthread 
%
./transcode 
transcode() : [°C]
%

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Borland C++ includes problem

2002-03-11 Thread Don Mastrovito

Rhys,

I think I understand your problem, but it was a little hard to follow.  You 
keep mentioning BC++, but that is a very different product from 
BCB.  However, your path statement contains references to CBuilder and you 
are trying to use the BCB5 stuff, so I'll assume you are really running 
BCB5.  Also path includes names like XML4C.  Are you really trying to build 
XML4C or Xerces.  They are similar, but I'm not familiar with the build 
requirements for XML4C. I rather doubt that the Xerces project files will 
work with with XML4C.  I'll assume you really want to build Xerces.

Your path statement is pretty ugly.  Lots of programs have problems with 
exceedingly long path statements.  There are even limits on the length 
imposed by a DOS box.  In addition, there are a number of command line 
utilities that do not function properly if directory or file names include 
dashes ("-").  Command line utilities like BCC32, TLINK32, and ILINK32 do 
not always tolerate dashes in directory or file names because they look 
like switches.  This is especially true for pre-BCB6 compilers and 
linkers.  Even then, BCB6 ILINK32 still has one such bug where an offensive 
path is contained within an environmental variable.  Things like 
xml4c-src4_0_0 should be renamed.  If possible, reset your path to what 
would have normally been there before you added the Xerces paths.  Try this 
(carriage returns added for clarity):

C:\WINDOWS;
C:\WINDOWS\COMMAND;
C:\jdk1.3.0_02\bin;
C:\PROGRA~1\ULTRAE~1;
C:\PROGRA~1\BORLAND\CBUILD~1\BIN;
C:\PROGRA~1\BORLAND\CBUILD~1\PROJECTS\BPL

The BCB5 version of XercesLib.bpr (the project file) will correctly build 
Xerces 1.6.0 provided the directory structure used by the CVS build tree is 
not altered.  Open XercesLib.bpr in the IDE.  Go to your project options 
and click on the "Directory/Includes" tab.  Observe the Include 
paths.  Note that they are all defined as relative paths with respect to 
the project directory.  You will find the same is true for the library 
paths.  This means there is no need to modify the system path to include 
any additional directories.  Due to a buggy project manager, it is wise not 
to modify Xerces project options from within the IDE.  The pre-BCB6 PM has 
problems with very large projects.  Close (cancel) the options box, select 
"Project|Build" and you should end up with a usable DLL.

The workaround you mention has to do with path modifications within the 
project environment itself and not those referenced externally (such as the 
system path).  It only applies to version BCB6.

I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The 
older stuff had a number of problems (getting it to build and in using it) 
and I have no plans to update the project file to work with 1.7.0.

HTH,
Don

At 09:21 PM 3/10/2002 -0800, you wrote:

>My specific problem:
>
>My utility for Xerces is to use the dom components
>and/or sax components to persist data in various forms
>in an XML format.  I am somewhat experienced in using
>and structuring XML, yet have only about 6 months
>experience with coding C++ ( though I have been
>independantly studying programming languages for two
>years, now ).  The compiler that I have been using (
>and the only one I have access to ) is Borland C++
>professional 5.0 .  In attempting to use Xerces, I
>downloaded both formats of version 1.4.0 for windows (
>stable source and stable binary ), and more recently
>1.6.0 and 1.7.0 .
>
>I have been able to get programs to compile using
>header files and including their respective .cpp files
>within the program's project, many of which I have
>written, myself.  I admit, I did expect to just be
>able to have the .cpp and .h files located somewhere
>in my path, and just explicitly reference the .h
>files, and still have the program compile, but what do
>I know?  In the end, I got it to run by having
>everything I used under the same directory as the
>project, and both including header files and adding
>the .cpp's to the project.  It strikes me that this is
>not ideal and that I am probably missing something,
>but up 'til now I have been figuring things out
>myself, having no one suitable to ask for help.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Borland C++ includes problem

2002-03-11 Thread Herb Chong


you are going to build makefiles for Borland, right?

Herb
---
I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The
older stuff had a number of problems (getting it to build and in using it)
and I have no plans to update the project file to work with 1.7.0.

HTH,
Don



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: SysAllocString

2002-03-11 Thread Murphy, James

You get 3 guesses... :)
It frees the BSTR allocated with SysAllocString(X)().  consider using the
ATL CComBSTR class or the MFC CString class - they manage much of this for
you.

Jim


> -Original Message-
> From: Bavishi, Pankaj [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 09, 2002 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: RE: SysAllocString
> 
> 
> Thanks a lot..works great.
> What does sysfreestring(bstr) do?
> 
> -Original Message-
> From: David N Bertoni/Cambridge/IBM 
> [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, March 08, 2002 10:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: SysAllocString
> 
> 
> Since DOMString stores Unicode characters encoded in UTF-16, 
> there's no
> need to transcode to do what you want.  Just use 
> DOMString::rawBuffer() to
> get the pointer, and go from there:
> 
> DOMString  nodeName(XMLNode.getNodeName());
> 
> BSTR bstr = SysAllocStringLen(nodeName.rawBuffer(), 
> nodeName.length());
> 
> SysFreeString(bstr);
> 
> Dave
> 
> 
> 
>  
> 
>   "Bavishi,
> 
>   Pankaj"  To:
> [EMAIL PROTECTED]
> 
>Bertoni/Cambridge/IBM)  
>   ca.com>  Subject: RE: 
> SysAllocString
> 
>  
> 
>   03/08/2002 03:38
> 
>   PM
> 
>   Please respond
> 
>   to xerces-c-dev
> 
>  
> 
>  
> 
> 
> 
> 
> I get what you are saying. But in my code, I don't know what 
> "Hello" is?
> I mean I have :
> 
> Char* vna2 = ((XMLNode.getNodeName()).transcode());
> BSTR bstr= SysAllocString(vna2)doesn't work..
> 
> I am not in a position to print the string and then put it in SysAlloc
> function.
> 
> 
> -Original Message-
> From: John Utz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 08, 2002 6:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SysAllocString
> 
> this is because the L makes it a wide string
> 
> On Fri, 8 Mar 2002, Bavishi, Pankaj wrote:
> 
> > When I use:
> > BSTR bstr=SysAllocString(L"Hello");
> > It works fine
> > But I can't do:
> > Char* str ="Hello";
> 
> WCHAR* wstr = L"Hello";
> 
> > BSTR bstr=SysAllocString(str);
> >
> > Why? Could you please suggest me the Solution.
> > This is the process to convert DOMString to BSTR>
> > Thanks
> > pankaj
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




select all nodes

2002-03-11 Thread pankaj bavishi

Hello,
I need to select all nodes matching a pattern or string in the document using DOM parser.
How can I do this?
In MSXML you can use something like:
Node->selectNodes("Hello");
Please help.Get your FREE download of MSN Explorer at http://explorer.msn.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: select all nodes

2002-03-11 Thread Erik Rydgren



Sounds 
like you should use DOM_Element::getElementsByTagName(const DOMString& name) 
method.
If you 
need more then that then take a look at the Xalan XPath implementation at www.apache.org.

Regards 
Erik Rydgren Mandarinen systems AB Sweden 


  -Original Message-From: pankaj bavishi 
  [mailto:[EMAIL PROTECTED]]Sent: den 11 mars 2002 
  16:32To: [EMAIL PROTECTED]Subject: select all 
  nodes
  
  
  Hello,
  I need to select all nodes matching a pattern or string in the document 
  using DOM parser.
  How can I do this?
  In MSXML you can use something like:
  Node->selectNodes("Hello");
  Please help.
  
  Get your FREE download of MSN Explorer at http://explorer.msn.com.- 
  To unsubscribe, e-mail: [EMAIL PROTECTED] For additional 
  commands, e-mail: [EMAIL PROTECTED]


RE: select all nodes

2002-03-11 Thread pankaj bavishi

yeah I am using it. Its more to it than that.
Does XERCESC support recursive searching?
like say I have to find nodes with key Hello01/hello02, such that it should find all the nodes having Hello01 as tag name and then node name of children as hello02.?
do we have any apior I have to do it hard way?




>From: "Erik Rydgren" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: select all nodes 
>Date: Mon, 11 Mar 2002 16:43:33 +0100 
> 
>Sounds like you should use DOM_Element::getElementsByTagName(const 
>DOMString& name) method. 
>If you need more then that then take a look at the Xalan XPath 
>implementation at www.apache.org. 
>Regards 
> 
>Erik Rydgren 
>Mandarinen systems AB 
>Sweden 
> 
> -Original Message- 
> From: pankaj bavishi [mailto:[EMAIL PROTECTED]] 
> Sent: den 11 mars 2002 16:32 
> To: [EMAIL PROTECTED] 
> Subject: select all nodes 
> 
> 
> Hello, 
> 
> I need to select all nodes matching a pattern or string in the document 
>using DOM parser. 
> 
> How can I do this? 
> 
> In MSXML you can use something like: 
> 
> Node->selectNodes("Hello"); 
> 
> Please help. 
> 
> 
> 
> 
> 
>-- 
> Get your FREE download of MSN Explorer at http://explorer.msn.com. 
> - To 
>unsubscribe, e-mail: [EMAIL PROTECTED] For additional 
>commands, e-mail: [EMAIL PROTECTED] 
Chat with friends online, try MSN Messenger: Click Here

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: select all nodes

2002-03-11 Thread Joseph Kesselman/CAM/Lotus


Or, as a midpoint between the two -- I'm not sure whether Xerces-C
implements the DOM Level 2 Traversal APIs, but if so a NodeIterator or
TreeWalker with the appropriate filter settings might do what you need.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Bug #1601

2002-03-11 Thread PeiYong PY Zhang

Hi, there,

We have tried to reproduce it on our side, our configuration:

code base: xerces-c-src_2002-03-06.tar.gz
platform: Linux 2.2.12-20
gcc:  egcs-2.91.66 19990314/Linux (egx-1.1.2 release)
sample:   the piece of sample instance document and dtd file
provided by
  Martin (c below).

Result:   the DOMPrint can print those french accent chars as
expected.

I noticed that the bug was reported against XercesC1.5.1, could u
please
test it aginst the latest code base and if it happened again, please
list down
all details such as linux kernel version, gcc version, etc., otherwise,
please
close the bug, thanks.

Rgds,
PeiYong



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: select all nodes

2002-03-11 Thread pankaj bavishi



how do I use:
DOM_Document dummy.getElementsByTagName("hello");
how should I pass ("hello")...it should be a DOMString.
I can't do:
DOMString st = "hello";
please helpGet your FREE download of MSN Explorer at http://explorer.msn.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: select all nodes

2002-03-11 Thread Tinny Ng


> 
> Or, as a midpoint between the two -- I'm not sure whether Xerces-C
> implements the DOM Level 2 Traversal APIs

Yes it does.  

Tinny


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: select all nodes

2002-03-11 Thread Erik Rydgren

Use DOMString::transcode. Read the Xerces FAQ for common questions using it.
Regards
Erik Rydgren
Mandarinen systems AB
Sweden

-Original Message-
From: pankaj bavishi [mailto:[EMAIL PROTECTED]]
Sent: den 11 mars 2002 17:05
To: [EMAIL PROTECTED]
Subject: RE: select all nodes






how do I use:
DOM_Document dummy.getElementsByTagName("hello");
how should I pass ("hello")...it should be a DOMString.
I can't do:
DOMString st = "hello";
please help



Get your FREE download of MSN Explorer at http://explorer.msn.com.
- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




parser

2002-03-11 Thread pankaj bavishi




I have a xml file to parse.
I am using:
parser->parse(strXml.c_str());

DOM_Document doc = parser->getDocument();

But it returns 0 elements. why?
 Send and receive Hotmail on your mobile device: Click Here

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SysAllocString

2002-03-11 Thread Hal DeVore



> On Mon, 11 Mar 2002, "James" == Murphy, James wrote:

  James> ATL CComBSTR class or the MFC CString class
  James> they manage much of this for you.

Or the ATL/WTL CString class.

But you still have to understand the underlying semantics or 
it's easy to create memory leaks and/or access memory that's 
been freed.

One of the better descriptions of the semantics of the BSTR data 
type is in the book _ATL_Internals_ by Brent Rector and Chris 
Sells; ISBN 0-201-69589-8.

--Hal



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




please help!!!

2002-03-11 Thread pankaj bavishi

please help asap..
 
I have a string say str, and I want to parse it.
Can I do:
DOMParser* parser ;
parser->parse(str_cstr());
 
thanks so much

Great minds discuss ideas, Average ones discuss events, Small minds discuss people 



**Pankaj Bavishi 



10, Westgate Drive

Apt. #13,

Bohemia,

NY - 11716



>From: "Erik Rydgren" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: select all nodes 
>Date: Mon, 11 Mar 2002 17:25:50 +0100 
> 
>Use DOMString::transcode. Read the Xerces FAQ for common questions using it. 
>Regards 
>Erik Rydgren 
>Mandarinen systems AB 
>Sweden 
> 
>-Original Message- 
>From: pankaj bavishi [mailto:[EMAIL PROTECTED]] 
>Sent: den 11 mars 2002 17:05 
>To: [EMAIL PROTECTED] 
>Subject: RE: select all nodes 
> 
> 
> 
> 
> 
> 
>how do I use: 
>DOM_Document dummy.getElementsByTagName("hello"); 
>how should I pass ("hello")...it should be a DOMString. 
>I can't do: 
>DOMString st = "hello"; 
>please help 
> 
> 
> 
>Get your FREE download of MSN Explorer at http://explorer.msn.com. 
>- To 
>unsubscribe, e-mail: [EMAIL PROTECTED] For additional 
>commands, e-mail: [EMAIL PROTECTED] 
> 
> 
>- 
>To unsubscribe, e-mail: [EMAIL PROTECTED] 
>For additional commands, e-mail: [EMAIL PROTECTED] 
> 
Join the world’s largest e-mail service with MSN Hotmail. Click Here

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: select all nodes

2002-03-11 Thread pankaj bavishi

does xerces-c support anything similar to stringreader in xerces-j
I have to pass an inputstream as string. 
Please suggest.Join the world’s largest e-mail service with MSN Hotmail. Click Here

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Performance Issues on Solaris 2.7

2002-03-11 Thread Bhushan Khanal

You could try and parse a in-memory document. Just make sure that its not
too large that the OS might page it out (thereby running into the original
problem).

Bhusan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 10:58 PM
To: [EMAIL PROTECTED]
Subject: RE: Performance Issues on Solaris 2.7



Aniruddha wrote:
The comparisons were for :

Machine 1
 Windows Nt 4.0 Server, Memory: 256Mb Ram,
 Processor: pIII 800Mhz,Single CPU Machine
Machine 2
 SunOS 2.8, Memory: 256Mb Ram,
 Processor: sparcv9 400MHz,   Single CPU

>Will this make the performance on Machine 2 three times slower
>than machine 1? Or is it the way that I have built xerces which
>may be a problem?

Yes, if you are using gcc, or another compiler that does not have
the optimizations for Sparc V9, that and the slower CPU, and the
fact that Solaris doesn't really shine until you add a second CPU,
could very well result in a system that would run Xerces 3 times
slower than the NT server.

It would also depend on the disk used. Sun does use SCSI by default
on most machines, but does not support Ultra-160 yet, so it's
possible that your disk I/O could be slowing things down during I/O
from files while reading in XML. This is harder to quantitize.

I'd guess that you are using ATA disks for the NT box, as they are
the most common. But some of the cheap ATA disks are very slow, no
matter what the interface speed is, because of the slow rotation,
small cache, and slow seeks times. But in general, most people see
about the same relative performance from ATA disks as they do for
SCSI, unless they are using server class disks like 15KRPM Ultra-160
SCSI drives. This drives usually have about 8MB of cache on the disk
controller, and have seek times below 4ms. If you have these on an
NT system, they could outperform the slower SCSI drives by 3 or 4
times.

So I guess the answer is it's possible with the hardware you are
using to get 1/3rd the performance of the NT system. But there are
many variables. If you are building Xerces-C from scratch, you may
want to invest in the Forte 6.2 compilers from Sun. They do have
very good optimization.

Hope this helps - my best guess is that you have done nothing
wrong.

Regards,
--Carl

ps: my opinion is not the last word - I'd welcome any other
comments from the list, especially if anyone else has seen
similar performance issues between NT and Solaris machines
of this same class of hardware.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Borland C++ includes problem

2002-03-11 Thread Don Mastrovito

There should be a make file there.  It worked for me, but then I have the 
full development environment on my system.  I'd appreciate someone with 
just the free compiler checking it out.

Thanks,
Don

At 09:53 AM 3/11/2002 -0500, you wrote:

>you are going to build makefiles for Borland, right?
>
>Herb
>---
>I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The
>older stuff had a number of problems (getting it to build and in using it)
>and I have no plans to update the project file to work with 1.7.0.
>
>HTH,
>Don
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: please help!!!

2002-03-11 Thread Don Mastrovito

Pankaj,
This ought to get you started.  While this code snippet was not
compiled and tested, it was extracted from one of my projects.  It
demonstrates loading from either a file or a stream.
    const bool  LoadFromStream =
true;    // Set to false for file i/o
    const char *MyFileName =
"C:\TEMP\TEST.XML";
    const char *MyStream = "My Data";
    char   *BufferID =
NULL;
    MemBufInputSource *MemBufIS = NULL;
    DOMParser *Parser = new DOMParser; 
    Parser->setCreateEntityReferenceNodes(false); 

    Parser->setDoNamespaces(false); 
    Parser->setDoSchema(false); 
    Parser->setDoValidation(false); 
    Parser->setToCreateXMLDeclTypeNode(true); 
    Parser->setValidationScheme(false);
    if (!LoadFromStream) 
   
Parser->parse(MyFileName);
    else
    {
    MemBufIS = new
MemBufInputSource(
    (const
XMLByte*)MyStream,  
// Stream pointer
   
::strlen(MyStream) +
1,
// Byte (not character) count
   
&BufferID, 
// Buffer ID (becomes System ID)
   
false);
// Copy (not adopt) caller's buffer
    if (MemBufIS == NULL)
    {
    //
Handle errors here
    }
   
Parser->parse(*MemBufIS);
    } // End if (LoadFromStream)
    DOM_Node Root = Parser->getDocument();
    DOM_Document Document = 
Parser->getDocument();
    if (MemBufIS != NULL)
    delete MemBufIS;
HTH,
Don
At 05:15 PM 3/11/2002 +, you wrote:
please help asap..
 
I have a string say str, and I want to parse it.
Can I do:
DOMParser* parser ;
parser->parse(str_cstr());
 
thanks so much


Great minds discuss ideas, Average ones discuss events, 
Small minds discuss people 
**Pankaj Bavishi 
10, Westgate Drive
Apt. #13,
Bohemia,
NY - 11716
>From: "Erik Rydgren" 
>Reply-To: 
>To: 
>Subject: RE: select all nodes 
>Date: Mon, 11 Mar 2002 17:25:50 +0100 
> 
>Use DOMString::transcode. Read the Xerces FAQ for common questions
using it. 
>Regards 
>Erik Rydgren 
>Mandarinen systems AB 
>Sweden 
> 
>-Original Message- 
>From: pankaj bavishi
[mailto:[EMAIL PROTECTED]]

>Sent: den 11 mars 2002 17:05 
>To: [EMAIL PROTECTED] 
>Subject: RE: select all nodes 
> 
> 
> 
> 
> 
> 
>how do I use: 
>DOM_Document dummy.getElementsByTagName("hello"); 
>how should I pass ("hello")...it should be a DOMString.

>I can't do: 
>DOMString st = "hello"; 
>please help 
> 
> 
> 
>Get your FREE download of MSN Explorer at
http://explorer.msn.com.

>-
To 
>unsubscribe, e-mail: [EMAIL PROTECTED] For
additional 
>commands, e-mail: [EMAIL PROTECTED] 
> 
> 
>-

>To unsubscribe, e-mail: [EMAIL PROTECTED] 

>For additional commands, e-mail: [EMAIL PROTECTED]

> 

Join the world’s largest e-mail service with MSN Hotmail.
Click Here
- To
unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tornado 1 - Makefile

2002-03-11 Thread TU ANH NGUYEN

Hello,

I have a dump question.  Hope it does not bother you guys.  How do I
write a makefile for Tornado 1 that will compile all of my .cpp files from
one folder to run on vxWorks?  Please help.  Thank you.

Tu

- Original Message -
From: "Don Mastrovito" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 11:06 AM
Subject: Re: Borland C++ includes problem


> There should be a make file there.  It worked for me, but then I have the
> full development environment on my system.  I'd appreciate someone with
> just the free compiler checking it out.
>
> Thanks,
> Don
>
> At 09:53 AM 3/11/2002 -0500, you wrote:
>
> >you are going to build makefiles for Borland, right?
> >
> >Herb
> >---
> >I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The
> >older stuff had a number of problems (getting it to build and in using
it)
> >and I have no plans to update the project file to work with 1.7.0.
> >
> >HTH,
> >Don
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tornado 1 - Makefile

2002-03-11 Thread TU ANH NGUYEN

I forgot to mention that I am trying to port XML to vxWorks.


- Original Message -
From: "TU ANH NGUYEN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 11:25 AM
Subject: Tornado 1 - Makefile


> Hello,
>
> I have a dump question.  Hope it does not bother you guys.  How do I
> write a makefile for Tornado 1 that will compile all of my .cpp files from
> one folder to run on vxWorks?  Please help.  Thank you.
>
> Tu
>
> - Original Message -
> From: "Don Mastrovito" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 11, 2002 11:06 AM
> Subject: Re: Borland C++ includes problem
>
>
> > There should be a make file there.  It worked for me, but then I have
the
> > full development environment on my system.  I'd appreciate someone with
> > just the free compiler checking it out.
> >
> > Thanks,
> > Don
> >
> > At 09:53 AM 3/11/2002 -0500, you wrote:
> >
> > >you are going to build makefiles for Borland, right?
> > >
> > >Herb
> > >---
> > >I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The
> > >older stuff had a number of problems (getting it to build and in using
> it)
> > >and I have no plans to update the project file to work with 1.7.0.
> > >
> > >HTH,
> > >Don
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: parser

2002-03-11 Thread Matt Leinhos

Which parser are you using? How have you set it up (via set___() methods)?
What are the contents of strXml? Does the document you are parsing really
exist? We need way more details.

Matt


On Mar 11, pankaj bavishi wrote:  -

>
>
>
>I have a xml file to parse.
>
>I am using:
>
>parser->parse(strXml.c_str());
>
>DOM_Document doc = parser->getDocument();
>
>But it returns 0 elements. why?
>
>
> 
>
>
>___
>Send and receive Hotmail on your mobile device: Click Here
>- To
>unsubscribe, e-mail: [EMAIL PROTECTED] For
>additional commands, e-mail: [EMAIL PROTECTED]
>

-- 
Matt Leinhos
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: select all nodes

2002-03-11 Thread Matt Leinhos

Look at the InputSource class.

On Mar 11, pankaj bavishi wrote:  -

>
>does xerces-c support anything similar to stringreader in xerces-j
>
>I have to pass an inputstream as string.
>
>Please suggest.
>
>
>___
>Join the world’s largest e-mail service with MSN Hotmail. Click Here
>- To
>unsubscribe, e-mail: [EMAIL PROTECTED] For
>additional commands, e-mail: [EMAIL PROTECTED]
>

-- 
Matt Leinhos
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tornado 1 - Makefile

2002-03-11 Thread Bob Vaughn


I doubt if you can use Tornado I (VxWorks) as Xerces uses quite a bit of
exception handling.  You'll need to upgrade to Tornado II.

As far as makefiles go... I had makefiles for existing code that I just
added Xerces files to.  I think you can build a "project" in Tornado with
all of the Xerces files but I don't use it that way.  We use GNU Make but
yours will probably vary depending on your development system and target
processor.  I would suggest finding a good tutorial on makefiles for your
environment.

Bob Vaughn
Telestream, Inc.


-Original Message-
From: TU ANH NGUYEN [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tornado 1 - Makefile


Hello,

I have a dump question.  Hope it does not bother you guys.  How do I
write a makefile for Tornado 1 that will compile all of my .cpp files from
one folder to run on vxWorks?  Please help.  Thank you.

Tu

- Original Message -
From: "Don Mastrovito" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 11:06 AM
Subject: Re: Borland C++ includes problem


> There should be a make file there.  It worked for me, but then I have the
> full development environment on my system.  I'd appreciate someone with
> just the free compiler checking it out.
>
> Thanks,
> Don
>
> At 09:53 AM 3/11/2002 -0500, you wrote:
>
> >you are going to build makefiles for Borland, right?
> >
> >Herb
> >---
> >I would also suggest you stick with Xerces 1.6.0 if you have BCB5.  The
> >older stuff had a number of problems (getting it to build and in using
it)
> >and I have no plans to update the project file to work with 1.7.0.
> >
> >HTH,
> >Don
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: parser

2002-03-11 Thread pankaj bavishi




Here are the details:
I am using xerces-c, DOM parser (DOMParser* DP = new DOMParser);
I have a string (that has xml nodes) like: std::string strXml(pOrg)
here char*pOrg .
I have to parse this string as a DOM tree and get hold of root node. So I am doing:
Parser->parse(pOrg)
DOM_Document doc = Parser->getDocument();
But I don't get any elements/ nothing is retrieved.
What should I do? Please detail out, thanks so much.
note: I don't have xml file or a way to pass system id..I have to pass string.
 
>Which parser are you using? How have you set it up (via set___() methods)? 
>What are the contents of strXml? Does the document you are parsing really 
>exist? We need way more details. 
> 
>Matt 
> 
> 
>On Mar 11, pankaj bavishi wrote: - 
> 
> > 
> > 
> > 
> >I have a xml file to parse. 
> > 
> >I am using: 
> > 
> >parser->parse(strXml.c_str()); 
> > 
> >DOM_Document doc = parser->getDocument(); 
> > 
> >But it returns 0 elements. why? 
> > 
> > 
> >  
> > 
> > 
> >___ 
> >Send and receive Hotmail on your mobile device: Click Here 
> >- To 
> >unsubscribe, e-mail: [EMAIL PROTECTED] For 
> >additional commands, e-mail: [EMAIL PROTECTED] 
> > 
> 
>-- 
>Matt Leinhos 
>[EMAIL PROTECTED] 
> 
> 
>- 
>To unsubscribe, e-mail: [EMAIL PROTECTED] 
>For additional commands, e-mail: [EMAIL PROTECTED] 
> 
Chat with friends online, try MSN Messenger: Click Here

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: select all nodes

2002-03-11 Thread David N Bertoni/Cambridge/IBM


See the MemParse sample application.  Make sure you review all of the
sample applications before you post questions.  There's lots of stuff
there.

Dave



   
   
  "pankaj bavishi" 
   
 cc:  (bcc: David N 
Bertoni/Cambridge/IBM)  
   Subject: RE: select all nodes   
   
  03/11/2002 09:37 
   
  AM   
   
  Please respond   
   
  to xerces-c-dev  
   
   
   
   
   



does xerces-c support anything similar to stringreader in xerces-j


I have to pass an inputstream as string.


Please suggest.



Join the world's largest e-mail service with MSN Hotmail. Click Here
- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DO NOT REPLY [Bug 7000] - UnixHTTPURLInputStream.cpp (Version 1.7 and 1.6)

2002-03-11 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7000

UnixHTTPURLInputStream.cpp (Version 1.7 and 1.6)





--- Additional Comments From [EMAIL PROTECTED]  2002-03-11 21:12 ---
Kent,

Your patch (a good catch) is in CVS, please help verify and close the bug, 
thanks.

Rgds,
Peiyong

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DO NOT REPLY [Bug 3170] - URLs with ? type fragments in them don't work.

2002-03-11 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3170

URLs with ? type fragments in them don't work.





--- Additional Comments From [EMAIL PROTECTED]  2002-03-11 21:15 ---
Daniel,

I think Kent's patch to bug#7000 might probably solve this problem, please 
download the latest code from the nightly build and verify, if it does sovle 
your problem, please close the bug, thanks.

Rgds,
Peiyong

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DO NOT REPLY [Bug 7000] - UnixHTTPURLInputStream.cpp (Version 1.7 and 1.6)

2002-03-11 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7000

UnixHTTPURLInputStream.cpp (Version 1.7 and 1.6)

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Linking Error on Solaris 8, Xerces C 1_7_0

2002-03-11 Thread Todd Keen

I receive the following link errors when I attempt to build Xerces into
my executable:

-L/space/u01/downloads/xerces-c-src1_7_0/lib/ 
ild: (undefined symbol) __RTTI__1nMXMLException_ -- referenced in the
data segment of bin/forte32dbg/DVT.o
ild: (undefined symbol) void XMLPlatformUtils::Terminate() -- referenced
in the text segment of bin/forte32dbg/DVT.o
ild: (undefined symbol) unsigned short*XMLString::transcode(const
char*const) -- referenced in the text segment of bin/forte32dbg/DVT.o
ild: (undefined symbol) void XMLPlatformUtils::Initialize() --
referenced in the text segment of bin/forte32dbg/DVT.o
ild: (undefined symbol) SAX2XMLReaderImpl::SAX2XMLReaderImpl() --
referenced in the text segment of bin/forte32dbg/DVT.o
make[1]: *** [bin/forte32dbg/DVT] Error 5
make[1]: Leaving directory `/export/home/tkeen/projects/DVT'
make: *** [current_dir] Error 2
> echo $XERCESCROOT
/space/u01/downloads/xerces-c-src1_7_0


**

I have already downloaded and built the libxerces-c1_7_0.so on my
machine using the forte C++ compiler.
All sample Xerces code builds and runs, etc ...
I am not sure what else to try.

Thanks in advance for any help you can provide,

Todd Keen
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Borland C++ includes problem

2002-03-11 Thread Rhys Black


--- Don Mastrovito
<[EMAIL PROTECTED]> wrote:
> Rhys,
> 
> I think I understand your problem, but it was a
> little hard to follow.  You 
> keep mentioning BC++, but that is a very different
> product from 
> BCB.  However, your path statement contains
> references to CBuilder and you 
> are trying to use the BCB5 stuff, so I'll assume you
> are really running 
> BCB5.  Also path includes names like XML4C.  Are you
> really trying to build 
> XML4C or Xerces.  They are similar, but I'm not
> familiar with the build 
> requirements for XML4C. I rather doubt that the
> Xerces project files will 
> work with with XML4C.  I'll assume you really want
> to build Xerces.
> 
> Your path statement is pretty ugly.  Lots of
> programs have problems with 
> exceedingly long path statements.  There are even
> limits on the length 
> imposed by a DOS box.  In addition, there are a
> number of command line 
> utilities that do not function properly if directory
> or file names include 
> dashes ("-").  Command line utilities like BCC32,
> TLINK32, and ILINK32 do 
> not always tolerate dashes in directory or file
> names because they look 
> like switches.  This is especially true for pre-BCB6
> compilers and 
> linkers.  Even then, BCB6 ILINK32 still has one such
> bug where an offensive 
> path is contained within an environmental variable. 
> Things like 
> xml4c-src4_0_0 should be renamed.  If possible,
> reset your path to what 
> would have normally been there before you added the
> Xerces paths.  Try this 
> (carriage returns added for clarity):
> 
> C:\WINDOWS;
> C:\WINDOWS\COMMAND;
> C:\jdk1.3.0_02\bin;
> C:\PROGRA~1\ULTRAE~1;
> C:\PROGRA~1\BORLAND\CBUILD~1\BIN;
> C:\PROGRA~1\BORLAND\CBUILD~1\PROJECTS\BPL
> 
> The BCB5 version of XercesLib.bpr (the project file)
> will correctly build 
> Xerces 1.6.0 provided the directory structure used
> by the CVS build tree is 
> not altered.  Open XercesLib.bpr in the IDE.  Go to
> your project options 
> and click on the "Directory/Includes" tab.  Observe
> the Include 
> paths.  Note that they are all defined as relative
> paths with respect to 
> the project directory.  You will find the same is
> true for the library 
> paths.  This means there is no need to modify the
> system path to include 
> any additional directories.  Due to a buggy project
> manager, it is wise not 
> to modify Xerces project options from within the
> IDE.  The pre-BCB6 PM has 
> problems with very large projects.  Close (cancel)
> the options box, select 
> "Project|Build" and you should end up with a usable
> DLL.
> 
> The workaround you mention has to do with path
> modifications within the 
> project environment itself and not those referenced
> externally (such as the 
> system path).  It only applies to version BCB6.
> 
> I would also suggest you stick with Xerces 1.6.0 if
> you have BCB5.  The 
> older stuff had a number of problems (getting it to
> build and in using it) 
> and I have no plans to update the project file to
> work with 1.7.0.
> 
> HTH,
> Don
Dear Don,

I am definitely using BCB5, having purchased BCB5
professional from my college bookstore a few months
back.  I went back and downloaded both the source and
binary distributions for 1.6.0 .  I was, indeed,
trying to work with XML4C and Xerces at the same time,
and was apparently getting some of the documentation
mixed up.

I knew that my path was a nightmare, and subsequently
truncated it to what you suggested.  My present path
is listed below (carriage returns for clarity):

C:\WINDOWS;
C:\WINDOWS\COMMAND;
C:\jdk1.3.0_02\bin;
C:\PROGRA~1\ULTRAE~1;
C:\PROGRA~1\BORLAND\CBUILD~1\BIN;
C:\PROGRA~\BORLAND\CBUILD~\PROJECTS\BPL;
C:\xerces\xercesC1_6_0win32\bin;
C:\xerces\xercesC1_6_0win32\include;

However, it seems that BCB5 is not checking in the
last two listed directories.  I looked under the
project|options|Directories/Conditionals tab, and
noticed that the "Include Path" was set to:
$(BCB)\include;$(BCB)\include\vcl, the "Library Path"
was set to: $(BCB)\lib\obj;$(BCB)\lib, and the "Debug
Source Path" was set to: $(BCB)\source\vcl .  In
testing whether I could include the Xerces classes in
with my own program, below, I noticed that the Xerces
classes could not be found while the std classes
could.  In other words, I could use everything but
Xerces in my program (at least everything included
with BCB5 compiler).  Listed below is my test program,
testXML.cpp .

// testXML.cpp
#include 

using std::cin;
using std::cout;
using std::endl;

#include "moncls.h"
#include "mydate.h"
#include "receipt.h"

#include 

int main()
{
   // code snippet #'s 1 and 2, gestalted
   DOM_Document   myDocument;
   DOM_Node   aNode =
myDocument.createElement("receipt");
   DOM_Node docRootNode =
myDocument.getDocumentElement();
   docRootNode.AppendChild(aNode);


   return 0;
}
// end testXML.cpp

Upon compiling the previous code, I received the
following error messages:

errors:
[C++ Error] testXML.cpp(11): E2209 Unable to open
include file