473,770 Members | 7,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serialize document with internal DTD using DOMWriter ( Xerces )

Hi,

I'm trying to serialize an XML document to a file using XERCES-C++
2.1.0 . The Document contains an internal DTD.

The DTD contains some elements with default values like the following
snippet:

<!ELEMENT SFLOPTRECPATTER N (#PCDATA)>
<!ATTLIST SFLOPTRECPATTER N
string CDATA "&quot;&quo t; &quot;/&quot; &quot;-&quot; 0 9"

....and the document contains some elements like this one:

<SFLOPTRECPATTE RN string="&quot;& quot; &quot;/&quot; &quot;-&quot; 0
9"/>

My problem is:

when I parse the file, and later try to serialize it with DOMWriter's
writeToString-method, it breaks my internal DTD.
The above snippet will now look like this ( later resulting in a
parser error ),

<!ELEMENT SFLOPTRECPATTER N (#PCDATA)>
<!ATTLIST SFLOPTRECPATTER N
string CDATA """ "/" "-" 0 9"


while the corresponding element still remains correct:

<SFLOPTRECPATTE RN string="&quot;& quot; &quot;/&quot; &quot;-&quot; 0
9"/>

Can anyone tell me, how I could prevent DOMWriter from changing my
&quot; to " in a DTD?

Regards,

Simon
Jul 20 '05 #1
0 2003

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

Similar topics

2
6738
by: Jim Cobban | last post by:
I must be missing something. I am using org.apache.xml.serialize.XMLSerializer to save a DOM but I am not getting non-basic characters converted to UTF-8. I create Text nodes in the DOM by, for example: Document doc; JTextArea textPrompt; Text newTextNode;
3
4811
by: Jim Cobban | last post by:
I must be missing something. I am using org.apache.xml.serialize.XMLSerializer to save a DOM but I am not getting non-basic characters converted to UTF-8. I create Text nodes in the DOM by, for example: Document doc; JTextArea textPrompt; Text newTextNode;
0
1593
by: quitaxe | last post by:
hi i have tomcat 3.3,jdk1.4 setup and running perfectly on my win 98 pc.i have tried to install apache cocoon on this but have failed.i'm getting the following error when i startup tomcat(after it auto-deploys cocoon) and type the url: http://127.0.0.1:8080/cocoon into my ie5.5 Cocoon 2 - Internal server error
1
2802
by: kasiviswanath | last post by:
Hello, I'm using Xerces-c++ 2.2.0 API. I'm trying to serialize the DOM document to XML file but could n't find an equvivalent API for the same. Could some one give me pointer to the same. Awaiting your reply.
5
24723
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream s); public void Deserialize(Stream s); Within the MyUserControl class, there is a field of type MyInnerClass
1
7611
by: smithsraj | last post by:
Is there any way to write XML using SAX packages available in Xerces? there is a DOMWriter, but is there any way by which we can use SAX. like in MSXML we have IMXWriter which we can use along with its SAX handler to write XML. -Thanks in advance -Smith
10
8815
by: Simon Brooke | last post by:
The DOM API has included public Node importNode(Node,boolean) as a method of the Document interface for a long time. Does anything actually implement it? Xerces 2 is giving me: org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation. at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
2
2480
by: Gnus | last post by:
Hi all! I have a little(?) problem with external schema location... I'm using xerces/xalan (C++) for doing some actions with some set of xml-files. Some of these files must validating against schema, which location specify in config file ("external" schema). Other files must be validating against schema, which location specify in parsed xml file (via xsi:shemaLocation attribute, "internal" schema) How can I switch between these ...
1
2494
by: Neelam | last post by:
Hi, I am using DOMWriter to write into the xml as: (Using Xerces-c-2.7.0. and visual studio 2005) string file = "E:\\Conf.xml"; XMLCh * filename = XMLString::transcode(file.c_str()); XMLFormatTarget * fileTarget = new LocalFileFormatTarget(filename); // this line causes crash
0
9592
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
9425
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,...
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10004
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,...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
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
5313
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
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.