Android does not provide the javax.xml.transform package.

On Sun, Apr 5, 2009 at 2:23 PM, xspotlivin <dmbrown2...@gmail.com> wrote:
>
> I need to use the transform package (transformer, transformfactory,
> etc.) so that I can convert an xml node to a new document. However,
> when I try to import the package, it says that it cannot be resolved.
> Are you not allowed to use this package on Android?
>
> Below is the code subset of how I want to transform:
>
> import javax.xml.transform.Transformer;
> import javax.xml.transform.*;
> import javax.xml.transform.dom.DOMResult;
> import javax.xml.transform.dom.DOMSource;
>
> Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
> TransformerFactory tf = TransformerFactory.newInstance();
> Transformer xf = tf.newTransformer();
> DOMResult dr = new DOMResult();
> xf.transform(new DOMSource(adherenceIntervals), dr);
> Document adherenceIntervalsDoc = (Document) dr.getNode();
>
> NodeList medicationNodes = adherenceIntervalsDoc.getElementsByTagName
> ("Medication");
> int medicationLength = medicationNodes.getLength();
>
> Any thoughts?
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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

Reply via email to