[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading XML from a byte[]
Assuming it takes an InputStream, you could use a
java.io.ByteArrayInputStream.
Hen
On 25 Nov 2002, cfowler wrote:
> I have this code that easily reads XML from a file
>
> DocumentBuilder builder = factory.newDocumentBuilder();
> Document doc = builder.parse(new File(Globals.getProfileFileName()));
>
> But in this new case I need to read XML from a byte array. Is there a
> easy way Ic an apply this here to allow builder.parse() to parse a
> byte[] as having XML stuff.
>
> Thanks,
> Chris
>
>