473,791 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xerces: entity and doctype with DOMPrint

Hello everybody,
I use xerces for cpp and I'm tring to adapt domprint for my own needs.
What I cannot find how to do is how can I preserve certain enteties.
For example, if domprint run without "-e" then it substitutes ©
with '©',   with ' ' for xhtml documents, but I want it not to
replace   cause it will change xhtml documents. (If I use -e
domprint leaves oll the entities, but that's not what I need). First I
tried to redeclare entity nbsp inside inline doctype declareation so
that it would be replaced with " " text :), but it results in
error: circular expansion. Is there a way to to make   replaced by
 ?
Second thing, I use custom dtd for my documents and my modified
DOMPrint does some small transformations on the input document, then I
need to replace <!DOCTYPE ...> element with something different, is
there any other way to do this other than simple search/replace in
resulting output document?? What I'd really like to do is to declare
some entity in my custom dtd that holds proper dtd declaration for
transformed document (I have a few custom dtd's and each of them
corresponds to some other dtd)

Thanks alot!!

Sep 26 '05 #1
2 1895
Hmmm. If you have a lot of XML to modify, I'd use TextPipe Pro
(www.datamystic.com). It has a lot of neat XML and HTML restrictions
that can be embedded inside each other, so you could restrict your
change to just the DTD.

Sep 26 '05 #2
Basicly, I solved the problem with replaced dtd - now I use from the
beginning the dtd that's expected to come at the end and I use
XMLEntityResolv er to redirect external entities for certain dtd's;
The problem with &nbsp; seems to be the only problem I cannot solve at
the moment
is there anyone who is familiar with xerces?? how can I do that??

thank you

Sep 26 '05 #3

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

Similar topics

0
1776
by: BODIN | last post by:
I have an XML document, which is actually physically stored in 2 separated files. doc1.xml and doc2.xml I NEED a WAY FOR THIS SIMPLE NEED : XML file splitted into two physical files, and use of XML Schema.
0
3054
by: Xamalaek | last post by:
Hello, I need some help with the DOM TreeWalker API. I modified the Xerces DOMPrint sample because I wanted to play around with the DOMTreeWalker API to iterate through the sample.xml file. Unfortunately I can't get the treewalker to spit out anything ... it seems others have had similar problems as well see:...
4
1757
by: SL | last post by:
Hi, Im' using Xerces-j (version 2.0.1 and 2.6.2). When parsing this prolog : <!DOCTYPE teiCorpus PUBLIC "-//TEI Consortium//DTD TEI P4//EN" "d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd" The same thing appens with external entity uri declaration :
3
2765
by: ciaran.mchale | last post by:
Hi folks, I downloaded the binary version of Xerces C++ 2.7.0 for Windows and am using it to help me get up to speed with XML and XML Schema. So please excuse me if this is a "novice" question. In the samples/data directory, I ran the following command for all the files: DOMPrint -n -s -f -v=always <filename>
2
2530
by: delphin.lecucq | last post by:
Hello, I want to load a grammar which doesnt not come with a DOCTYPE declaration, I tried with those lines, and it doesn't work parser->setFeature(XMLUni::fgSAX2CoreValidation, true); parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, false)
2
1518
by: Shyamrox | last post by:
Xerces for C++ serializes my DOM in UTF-16 , when I try to setEncoding on the DOMDocument and/or the DOMWriter, it still never changes the encoding. Can anyone provide tips/example code on how to do this? Is it possibly a bug with xerces 2.6? Thank You!! Shyam
1
3912
by: Benjamin Black | last post by:
Hello, I'm trying to get some code that uses the Xerces library (XML parsing) to run in Visual C++ 2005 Express. I've linked the library (xerces-c_2D.lib) and the \lib and \include locations to the project and everything compiles, but can't link it: 1>DOMPrint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl xercesc_2_7::XMLString::release(wchar_t * *)"...
0
1352
by: punjabinezzie | last post by:
I am developing an Application which currently has two XML files. One XML file with some nodes and an external entity reference to another XML file. The source XML file is being parsed using Xerces (DOM Parser), upon reaching an external entity reference node the external file being referenced does not get parsed. Instead an empty node or the current node name is substituted in place and the remaining nodes parsed from original source file...
3
5939
by: Dhirendra Singh | last post by:
I am new to xml parsing concept. can anyone suggest good books on Xerces C++ parsers. API documentation provided by apache is very raw and i do not find it very useful.
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.