xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JC Tchitchiama <...@panonet.net>
Subject Re: XMLOutputter content to xindice
Date Fri, 07 Nov 2003 15:25:18 GMT
All,

Here is the answer to this issue;

Look at my code snippet

/** WARNING it's important to trim the string
 * because when XMLOutputter, DOMOutputter, XMLSerializer
 * is used to populate the outputstream; they append 
 * charaters unwanted by most XML parsers.
 */
XMLResource src.setDocument(doc.trim())
storeResource(rsc)

Also notice that making  the method calls below dis not make a difference.

XMLOutputter outputter = new XMLOutputter();
outputter.setTextTrim(true);
outputter.setTrimAllWhite(true);


I'd like to hear from any xerces/XMLParser expert out there for an 
explanation.

Et Voila !!!



On Friday 07 Nov 2003 11:25 am, JC Tchitchiama wrote:
> Hi All,
>
> The symptoms of this problem is that I cannot store a document to xindice
> as String or DOM.
>
> So I tries the following scenario
>
> DOM parse a document stored in an  OutputStream by XMLOutputter
> e.g.
> JDOM->XMLOutputter.output(Document OutputStream)->DOMParser(InputStream)
>
>  I keep on getting
>  at org.jdom.input.SAXBuilder.build(SAXBuilder.java:381)
>  on line 1: Content is not allowed in prolog.
>
> I am sure that the JDOM document is fine because when I parse it just
> before calling the XMLOutputter it is fine.
>
> I stored the document to a file and it looks fine to me.
>
> Has anybody come across something similar, I'd appreaciate any clues
>

Best Regards.

JC.
           \\- - -//
          (  @ @  )
===oOOo-(_)-oOOo=================================================
      jct@panonet.net
=================================================================


Mime
View raw message