Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - extract inner xml... >Thread Next - Re: extract inner xml... Re: extract inner xml...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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
