Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Hi to All Groups Google

Reply
Thread Tools

Hi to All Groups Google

 
 
sekhar145
Guest
Posts: n/a
 
      03-28-2008
After loading xml from file, i want to modify DOCTYPE but it is read
only am using org.w3c.dom packages.

can any ONE suggest or send some examples how to modify DOCTYPE IN XML
USING JAVA CODE.
 
Reply With Quote
 
 
 
 
sekhar145
Guest
Posts: n/a
 
      03-28-2008
On Mar 28, 11:15*am, sekhar145 <(E-Mail Removed)> wrote:
> After loading xml from file, i want to modify DOCTYPE but it is read
> only am using org.w3c.dom packages.
> exceptions getting: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
> can any ONE suggest or send some examples how to modify DOCTYPE IN XML
> USING JAVA CODE.


 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      03-28-2008
sekhar145 wrote:
> After loading xml from file, i want to modify DOCTYPE but it is read
> only


Make it read/write and do the modification *before* you open the document.

> am using org.w3c.dom packages.
>
> can any ONE suggest or send some examples how to modify DOCTYPE IN XML
> USING JAVA CODE.


I don't think you can do this. By the time the document is open, the
DOCTYPE Declaration has already been used and discarded.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
 
Reply With Quote
 
none
Guest
Posts: n/a
 
      03-30-2008
Check whether your parser allows plugging in an entity resolver, which
could intercept the request for the external part of the DTD and
redirect it to a private copy.

Alternatively, plug in a text filter before the XML parser which
understands just enough XML to find and alter the DTD.

Alternatively: If this isn't the right DTD, why is your document
pointing to it in the first place? Fix your doc...
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Groups View New "Collapse All" Mode.. ChrisCoaster Computer Information 6 11-01-2011 07:23 PM
Does Google Groups contain Google Docs? me@privacy.net Computer Support 2 09-20-2009 08:08 AM
Re: Try Doing A Google Search For Greg Carr On Google Groups Kevin C Baer Computer Support 4 09-16-2008 10:09 PM
FAQ - references to Google/Google Groups Andrew Thompson Java 0 06-20-2005 12:26 PM
getting values from URL such as http://groups.google.co.uk/groups?q=parameters+url+asp.net&start=10&hl=en&lr=& anonymous ASP .Net 1 05-08-2005 03:58 PM



Advertisments