Re: Two namespace-questions
"Jose manuel Corrales" <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
Can I recover with jdom all the nodes of a document xml that call equally??
To extract xml.
My code
SAXBuilder builder=new SAXBuilder(false);
Document doc=builder.build("file.xml");
Element raiz=doc.getRootElement();
List chapter=raiz.getChildren("CHAPTER");
Iterator i = chapter.iterator();
while (i.hasNext()){
Element e= (Element)i.next();
Element section =e.getChild("SECTION");
List sectionHijos=e.getChildren("SECTION");
XMLOutputter out = new XMLOutputter();
FileWriter writer = new FileWriter("TestVarios2.xml");
out.output(section,writer);
writer.flush();
writer.close();
example :
out.output(sectionHijos,writer)
|--------------------------------------->failed
>
>
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]