Hi all,

I'm using org.w3c.dom.Document to create a document and I need now to
write it into a .xml file. I saw tutorials refering the
javax.xml.transform.Transformer package but this one is not avalaible
in the Android platform.

My code looks like this :

[...]

org.w3c.dom.Document document = null;

DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder;

try
{
  docBuilder = dbfac.newDocumentBuilder();
  document = docBuilder.newDocument();

  processDocument(document);
}
catch (ParserConfigurationException e)
{
  // TODO Auto-generated catch block
  e.printStackTrace();
}

if (document != null)
{
  documentToFile(document, filename); // this is what I need!
}

[...]

I've been looking for hours now and I can't find a way to get this
working!

Thanks for any help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to