Skip to content

XAware Community

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
XAware 5.6
Need Help
Webinars and Events
Advanced Tutorials
Webinars and Events

You are here: Home arrow Forums
XAware Community Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:File writer does not write structured XML (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:File writer does not write structured XML
#4877
prichards (Admin)
Admin
Posts: 319
User Offline Click here to see the profile of this user
Re:File writer does not write structured XML 10 Years, 11 Months ago Karma: 18  
The File BizComp currently does not have a configurable setting for the ouptut format for XML (it uses the default XMLOutputter format which is "raw"). This would be a good feature request to add to SourceForge (and maybe also for xa:xml_to_text).

For now, you could write an extension or a Functoid and call your own XMLOutputter with the formatting options you want. (An extension can process a reference to the XML element that you want to write out, whereas using a functoid you would have to first convert the serialized string into XML, including XML encoded characters).

The XMLOutputter code is fairly simple, such as:
Code:

OutputStream outStream = new FileOutputStream(filename); XMLOutputter out = new XMLOutputter(); Format pretty = Format.getPrettyFormat(); pretty.setIndent(" "); pretty.setLineSeparator(System.getProperty("line.separator")); pretty.setTextMode(Format.TextMode.PRESERVE); out.setFormat(pretty); out.output(xmlElement, outStream);
and there are additional options for managing whitespace characters.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
File writer does not write structured XML
sanjeev.khare 2009/06/22 02:38
    thread link
thread linkthread link Re:File writer does not write structured XML
prichards 2009/06/22 16:46
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Community Login

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
Commercial
Free Training
QuickStart Packages
Image 4 Title
Image 5 Title

Visit XAware.com