Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Hi to All Groups Google (http://www.velocityreviews.com/forums/t602453-hi-to-all-groups-google.html)

sekhar145 03-28-2008 06:15 AM

Hi to All Groups Google
 
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.

sekhar145 03-28-2008 07:48 AM

Re: Hi to All Groups Google
 
On Mar 28, 11:15*am, sekhar145 <sekhar...@gmail.com> 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.



Peter Flynn 03-28-2008 08:57 PM

Re: Hi to All Groups Google
 
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/

none 03-30-2008 07:42 PM

Re: Hi to All Groups Google
 
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...


All times are GMT. The time now is 01:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.