XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 5th, 2003, 10:11 PM
Wiseblood Wiseblood is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 Wiseblood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry Urgent help needed, ignoring DTD comments and default attributes (JAXP)

I have an XML file from which I build a DOM using a validating parser. I then set some values for some tags, and transform the DOM into a string, which then goes out on the wire. However, the resulting string contains ALL the comments that are inside the DTD (setIgnoringComments(true) in DocumentBuilderFactory only seems to take care of the comments in the XML file itself, not the DTD against which it is validated when the DOM is built).

This, however, is not that big of a deal. It does make for a larger-than-needed message, but I can live with that. The bigger problem is that the resulting string also contains all the default attributes specified in the DTD for all the tags. This is breaking the application receiving the message on the other end. None of these attributes are mandatory, so I would like to just have the tags w/out them.

I cannot find any transform or DocumentBuilder APIs to ignore DTD comments and default attributes. If anyone has any ideas, please help, this is quite urgent.

Thanks!

Reply With Quote
  #2  
Old July 7th, 2003, 12:15 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Do you have your dtd in the same file with your xml? Have you tried seperating them into seperate files?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Urgent help needed, ignoring DTD comments and default attributes (JAXP)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway