Re: Populate ActionForm with an XML DOM object

2001-12-20 Thread Matt Raible

XBeans might be a solution.  I've never worked with them, but might be what
you're looking for:

http://www.xbeans.org/


--- Wilhelm *Rafial* Fitzpatrick [EMAIL PROTECTED] wrote:
 Other approaches anyone? (Apart from using XSLT. Seems like if I choose that
 route I lose the benefits of the ActionForm/Validation/Token etc.)
 
 Well, I have a requirement that I need to pass the DOM from my 
 application back to the server without modifying or damaging any part 
 of it that my application is not concerned with, so I've come up with 
 the notion of something I call an XML bean, which is just like a 
 regular Java bean expect that instead of storing its values in fields 
 inside the bean, they are bound to a particular node of the DOM.  I 
 have a set of utility objects so I can do something like:
 
 private StringField myvar = new StringField( dom, NODENAME );
 public String getMyvar() { myvar.get(); }
 public void setMyvar( String s ) { myvar.set( s ); }
 
 Then I'm making my ActionForms into these XmlBeans, and using them in 
 the struts framework as normal.  So far its worked out well, but I'm 
 not so sure what kind of load they will be able to handle.
 
 -raf
 -- 
 __
 Eric: I want to live in a world where software doesn't suck //
 Richard: Any software that isn't free sucks // [EMAIL PROTECTED]
 Linus: I'm interested in free beer / http://www.3roses.com/ 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Populate ActionForm with an XML DOM object

2001-12-17 Thread ltorrence

I have a back-end data source that provides me with an XML object. I'd like
to populate an ActionForm based on that XML. Is there sample code like this
somewhere?

Most uses of the Digester I've seen deal with loading config files, or an
initial load of an in-memory database. Would the Digester be apropriate for
this job in a high-volume environment?

Other approaches anyone? (Apart from using XSLT. Seems like if I choose that
route I lose the benefits of the ActionForm/Validation/Token etc.)

Lee



RE: Populate ActionForm with an XML DOM object

2001-12-17 Thread sven . ehrke


 I have a back-end data source that provides me with an XML 
 object. I'd like
 to populate an ActionForm based on that XML. Is there sample 
 code like this
 somewhere?

In my project we are using JAXB

  http://java.sun.com/xml/jaxb/

which is works perfect and is very convenient to use.

- Sven Ehrke


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Populate ActionForm with an XML DOM object

2001-12-17 Thread Pete Carapetyan

 I have a back-end data source that provides me with an XML object. I'd like
 to populate an ActionForm based on that XML. Is there sample code like this
 somewhere?


There may be more straightforward answers than this, but if all else fails,
Expresso extends ActionForm and then also has built in functionality that
automates XML dumps. So all the code should be there, though you might have to
un-entangle other stuff like security, logging, etc.

As always, full source code available.

Hope this helps.

Sometimes when I post here it almost feels creepy, like an Expresso
advertisement, but really we are just a bunch of guys banging on a shared code
base. Not Apache, but it's still open source, and most of it's components come
from Apache anyway. Apologize if we come across as pushy. Every time new guys
join us, it just means we get more functionality to share between each other.
That's a big incentive, because lots of cool stuff has been added that way.

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




AW: Populate ActionForm with an XML DOM object

2001-12-17 Thread Hudayioglu, Fehmi

Hi, 
I have done reading XML file thing in JSP. this works with jaxp1.1.3 (if you
dion't have this in your application server, just put in the lib directory
of your application - tmcat 4 doesnot require this anyway).
In the attachment you can find useful methods hope work fine.
good luck.
fehmi.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Monday, December 17, 2001 12:30 PM
An: [EMAIL PROTECTED]
Betreff: Populate ActionForm with an XML DOM object

I have a back-end data source that provides me with an XML object. I'd like
to populate an ActionForm based on that XML. Is there sample code like this
somewhere?

Most uses of the Digester I've seen deal with loading config files, or an
initial load of an in-memory database. Would the Digester be apropriate for
this job in a high-volume environment?

Other approaches anyone? (Apart from using XSLT. Seems like if I choose that
route I lose the benefits of the ActionForm/Validation/Token etc.)

Lee




intrnav.jsp
Description: Binary data


nav_config.xml
Description: Binary data

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]