Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: extract inner xml...

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 3/17/2009 3:03:00 PM
Loocek wrote:

> I need to find and extract inner xml and save as String.
> I cannot find that functionality in any [DOM,SAX,STAX] xml parser in 
> java...
> I was able to do it in DOM by serializing Node - but is stupid solution....

I am not sure why it is a stupid solution. If you want the inner XML 
then you will have to serialize the child nodes, unless the object model 
is not already providing properties like InnerXml (as for instance the 
.NET framework's DOM model does:
http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.innerxml.aspx)

If you are using the W3C DOM then Level 3 has serialization features
   http://www.w3.org/TR/DOM-Level-3-LS/
I think Java 5 and 6 implement that. In the browser world of the DOM 
only Opera supports it but Mozilla has XmlSerializer and IE/MSXML have 
the xml property on XML DOM nodes.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent