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

Xerces C++: How to make DOM from XML in MemBufInputSource?

I have XML in a string/memory buffer, which I converted to a
MemBufInputSource. I would like to make a DOM from this data, but I
cannot see how to do this.

Is there a way to easily create a DOM from memory/MemBufInputSource
much like the way the DOMCount example creates the DOM from an xml
file? I don't want to write the memory to a file then pass the
filename that to DOMBuilder::parseURI, that would ge grossly
inefficient.

Thanks,
Tim
Jul 20 '05 #1
2 6723
In article <5c**************************@posting.google.com >,
re****@gmail.com (Dingus) wrote:
:I have XML in a string/memory buffer, which I converted to a
:MemBufInputSource. I would like to make a DOM from this data, but I
:cannot see how to do this.
:
:Is there a way to easily create a DOM from memory/MemBufInputSource
:much like the way the DOMCount example creates the DOM from an xml
:file? I don't want to write the memory to a file then pass the
:filename that to DOMBuilder::parseURI, that would ge grossly
:inefficient.
:
:Thanks,
:Tim


I use Xerces in its Java form instead, so I'm not familiar with the C++
version, nor do I know precisely what a MemBufInputSource might be. But
I know that we've parsed a String into a DOM object directly from the
clipboard. To do that, we reference what's in the clipboard as an
InputStream object (a stream of bytes), which can be parsed directly by
a DOMParser.

HTH.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Jul 20 '05 #2
> I use Xerces in its Java form instead, so I'm not familiar with the C++
version, nor do I know precisely what a MemBufInputSource might be. But
I know that we've parsed a String into a DOM object directly from the
clipboard. To do that, we reference what's in the clipboard as an
InputStream object (a stream of bytes), which can be parsed directly by
a DOMParser.

HTH.

= Steve =


Thanks Steve. I ended up using the results of a XERCES parse to
create the new Xerces DOM.

Tim
Jul 20 '05 #3

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

Similar topics

2
by: Bekkali Hicham | last post by:
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i end up with a diectory hierarchy like this c:\xerces-2_4_0\XercesImpl.jar c:\xerces-2_4_0\XercesSamples.jar...
0
by: Waseem | last post by:
Hi I have looked and tried everything and i still cant sort this out i have no idea why this wont work I am using Xerces Perl on Windows and Debian to try this and it wont work on both of...
0
by: Jim Phelps | last post by:
After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7 for CC 6.2 I have decided to update to at least 2.4. I have downloaded the binary tarball and have installed it on my...
0
by: Dale Gerdemann | last post by:
I've been trying to use DOM level 3 with xerces-2_6_2. There's a sample called samples/DOM3.java, but I've had trouble with compilation. I've downloaded Xerces-J-bin.2.6.2 and...
3
by: Girish | last post by:
Hi All, I have written a component(ATL COM) that wraps Xerces C++ parser. I am firing necessary events for each of the notifications that I have handled for the Content and Error handler. The...
1
by: Girish | last post by:
Hello.. I need to understand how parsing of a file or a stream(XML data in memory) takes place in Xerces C++. I am using SAX XMLReader and passing xml input as a file path or a MemBufInputSource...
2
by: Vlad Zorinov | last post by:
I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
2
by: muralibala68 | last post by:
Hi, How do I parse an xml message that is in std::string using sax2 parse method that does not seem to take a string and expects a filename? Thanks.
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.