Title: What is the best way to create a class that manage pieces of a document?
Hi Michael
 
Unfortunately not, the javadoc, cookbook and quick start guide are currently all the documentation available.
 
The only helpful way of learning to use dom4j is to try looking at the sample programs in
 
dom4j/src/samples/
 
or the JUnit tests might be helpful here:-
 
dom4j/src/test/

James
----- Original Message -----
Sent: Wednesday, November 07, 2001 12:27 PM
Subject: RE: [dom4j-dev] What is the best way to create a class that manag e pieces of a do cument?

 
James,
 
Thanks. That is what I was trying to do, I did find my error. Thanks again.
 
Is there some other documentation other than the "CookBook" and the "Quick Start Guide" found on the DOM4j web page? Being new to JAVA, XML and DOM4J doesn't make it easy.....
 
Thanks again,
Michael
-----Original Message-----
From: James Strachan [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 05, 2001 12:42 PM
To: Virgil, Michael [BL60:437:EXCH]; dom4j-dev
Subject: Re: [dom4j-dev] What is the best way to create a class that manage pieces of a do cument?

Do you think you could explain what you mean a bit more? You mean like this kind of thing?
 
public interface FragmentFactory {
    public Element create();
}
 
public class MyFragmentFactory implements FragmentFactory {
    private DocumentFactory factory;
 
    public MyFragmentFactory() {
        factory = DocumentFactory.getInstance();
    }
 
    public MyFragmentFactory(DocumentFactory factory) {
        this.factory = factory;
    }
 
    public Element create() {
        // return some dummy fragment
        Element answer = factory.createElement( "foo" );
        answer.addElement( "time" ).addText( new Date().toString() );
        return answer;
    }
       
}
 
 

James
----- Original Message -----
Sent: Monday, November 05, 2001 3:34 PM
Subject: [dom4j-dev] What is the best way to create a class that manage pieces of a do cument?


Dom4j folks,

What is the best way to create a class that manages a pieces of a document? The class would create/render/retrieve a specific element of the document.

Does anyone have an example? Any help would be appreciated.

Thanks,
Michael



Reply via email to