[jdom-interest] Element Reference from Attribute
Jerry Lawson
jerry.lawson at virtualsummit.com
Fri Nov 17 11:57:40 PST 2000
One more thing your SAXFactory would need:
public Document createDocument (Element root) {
return new Document (root);
}
This would help those of us that require extending the Document class.
I'm not sure "SAXFactory" is a good name for this factory, though,
since it is not really SAX-specific, but really JDOM specific.
Maybe "JdomFactory" (or something similar) would be more appropriate.
James Strachan wrote:
>
> /** Default factory used by SAXBuilder / SAXHandler to
> * create JDOM objects from a SAX event stream
> */
> public class SAXFactory {
>
> public Element createElement(String localName, Namespace
> elementNamespace) {
> return new Element( localName, elementNamespace );
> }
> public Element createElement(String localName) {
> return new Element(localName);
> }
>
> public Attribute createAttribute(Element element, String attLocalName,
> String value, Namespace attNamespace) {
> return new Attribute(attLocalName, value, attNamespace);
> }
>
> public Attribute createAttribute(Element element, String attLocalName,
> String value) {
> return new Attribute(attLocalName, value);
> }
>
> public ProcessingInstruction createProcessingInstruction(String target,
> String data) {
> return new ProcessingInstruction(target, data);
> }
>
> public CDATA createCDATA(String data) {
> return new CDATA(data);
> }
>
> public DocType createDocType(String name, String publicId, String
> systemId) {
> return new DocType(name, publicId, systemId);
> }
>
> public Entity createEntity(String name) {
> return new Entity(name);
> }
>
> public Comment createComment(String commentText) {
> return new Comment(commentText);
> }
> }
>
> J.
>
> James Strachan
> =============
> email: james at metastuff.com
> web: http://www.metastuff.com
>
> If you are not the addressee of this confidential e-mail and any
> attachments, please delete it and inform the sender; unauthorised
> redistribution or publication is prohibited. Views expressed are those of
> the author and do not necessarily represent those of Citria Limited.
--
___________________________________________________
Jerry Lawson Virtual Summit, Inc.
Virtual Programmer jerry.lawson at virtualsummit.com
More information about the jdom-interest
mailing list