• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in castor please help

 
Neha Mohit
Ranch Hand
Posts: 87
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

First of all my apologies for not pasting the post on the proper forum.

I have problem in creating the proper xml file from java bean using castor; please help me.

Pasting the code, the mapping.xml for your reference.







The expected output should be
<?xml version="1.0"?>
<flight carrier="AR" depart="6:23a" arrive="8:42a" number="426"/>

The o/p i am getting is
<?xml version="1.0"?>
<flight-bean number="426">
<arrival-time>8:42a</arrival-time>
<departure-time>6:23a</departure-time>
<carrier>AR</carrier>
</flight-bean>


Thanks in advance
neha
[ June 27, 2007: Message edited by: Neha Mohit ]
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the node type to "attribute" for fields you want rendered as attributes:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic