[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Best way to create an XML document
- From: "Mukul Gandhi" <gandhi.mukul@gmail.com>
- To: rob@koberg.com
- Date: Wed, 9 Apr 2008 21:38:05 +0530
I think there is bug in the xml-writer library posted on the site.
When I run this code (a slightly modified version of the sample
supplied on the site):
DataWriter w = new DataWriter();
w.setIndentStep(2);
w.startDocument();
w.startElement("foo");
w.dataElement("bar", "1");
w.dataElement("bar", "2");
w.startElement("hack");
w.dataElement("fubar", "zing");
w.endElement("hack");
w.dataElement("bar", "3");
w.endElement("fo"); //please note, I have violated the XML well-formedness rules
w.endDocument();
I get the output:
<?xml version="1.0" standalone="yes"?>
---------> This extra whitespace also annoys me ...
<foo>
<bar>1</bar>
<bar>2</bar>
<hack>
<fubar>zing</fubar>
</hack>
<bar>3</bar>
</fo> -------> This is wrong.
Has anyone tried this library before? And what are the experiences.
On Wed, Apr 9, 2008 at 9:27 PM, Mukul Gandhi <gandhi.mukul@gmail.com> wrote:
> Thanks Rob for sharing the information.
>
> I'll try this ...
>
>
> On Wed, Apr 9, 2008 at 8:51 PM, Robert Koberg <rob@koberg.com> wrote:
> > Try:
> >
> > http://www.megginson.com/downloads/
> >
> > xml-writer-0.2.zip
> >
> > Easy and fast
> >
> > best,
> > -Rob
--
Regards,
Mukul Gandhi
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]