Thanks for the reply. I'm trying to create new elements/attributes *after*
the DOM has been "parsed in", so I'm traversing to the element and
calling addAttribute(..args..). At this time the element no longer
remembers that its document factory is the UserDataDocumentFactory without
making the changes below. I just saw a similar mail on the archive by
someone who was trying to do the same thing on org.w3c.DOM Elements, so
maybe this problem is more generic than I thought.


https://sourceforge.net/mailarchive/forum.php?thread_id=98464&forum_id=2702

Thanks
Vivek

On Fri, 18 Jan 2002 [EMAIL PROTECTED] wrote:

>
> You can use the UserDataDocumentFactory like this?
>
> DocumentFactory factory = UserDataDocumentFactory().getInstance();
>
> Create your document using the factory and it should return
> UserDataElements and UserDataAttributes.
> Hope this helps.
>
> Chuck Simpson
> [EMAIL PROTECTED]
>
>
> |--------+------------------------------------->
> |        |          Vivek Sahasranaman         |
> |        |          <[EMAIL PROTECTED]>          |
> |        |          Sent by:                   |
> |        |          [EMAIL PROTECTED]|
> |        |          eforge.net                 |
> |        |                                     |
> |        |                                     |
> |        |          01/18/02 01:23 PM          |
> |        |                                     |
> |--------+------------------------------------->
>   
>>--------------------------------------------------------------------------------------------------------------|
>   |                                                                                  
>                            |
>   |       To:     [EMAIL PROTECTED]                                    
>                            |
>   |       cc:                                                                        
>                            |
>   |       Subject:     [dom4j-dev] Problem with UserData{Element,Attribute}          
>                            |
>   
>>--------------------------------------------------------------------------------------------------------------|
>
>
>
>
>  Hi :
>   I'm trying to use a Dom4J DOM adorned with User defined objects
> (UserDataElement)
>   I tried to add an attribute to a UserDataElement (org.dom4j.util)
> after the DOM was created, and found that it added a "DefaultAttribute"
> rather than a "UserDataAttribute". Upon looking a bit at the source code,
> seems like the "getDocumentFactory() method that UserDataElement inherits
> from DefaultElement should be overriden so that it can provide it's own
> documentFactory. Can someone verify this is correct ? (Or do I have a
> version that is old ?)
>
> Thanks a lot
> Vivek
>
>
> _______________________________________________
> dom4j-dev mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-dev
>
>
>
>
>
>


_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to