aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Problem in castor please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem in castor please help " Watch "Problem in castor please help " New topic
Author

Problem in castor please help

Neha Mohit
Ranch Hand

Joined: Apr 25, 2006
Posts: 87
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

Joined: Oct 29, 2001
Posts: 8908
    
    8

Change the node type to "attribute" for fields you want rendered as attributes:


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in castor please help