This brings up a possible enhancement for 2.0 that's been rolling around the back of my
head. The W3C DOM node interface has methods for accessing siblings and to insert before
and after. Dom4j doesn't have comparable methods.
Now, I know I could grab the siblings of of a node with an xpath, but I've never found a
simple way to insert before/after. I've had to find the position of the node in the
content list and then insert at -1 or +1. I don't know if this is worth adding to a
long-standing public API, but I thought I'd at least mention it. Maybe others have found
this inelegant? Or maybe there's a really simple solution that I've just never noticed?
b
Mike Skells wrote:
Hi,
You can access the content of an element using the element.content()
method, This allows you to manupulate the content of the element directly.
This information is returned as a List, and is read/write
Mike
------------------------------------------------------------------------
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of *Savvy
Enriquez
*Sent:* 27 May 2005 03:29
*To:* dom4j-user@lists.sourceforge.net
*Subject:* [dom4j-user] insert a new row
hi!
i'm new with dom4j and i don't have any idea on how to do the
following task:
i have an xml document which i have to save as an excel file using
dom4j. my problem is i also have to insert records in the middle of
the file. is it possible?
sample layout:
Worksheet Header (also have to plot a value)
Column Header (also have to plot a value)
-- need to insert records here --
Sub-total row
Total row
i would appreciate any help from you guys...
thanks in advance...
------------------------------------------------------------------------
Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!
<http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/>
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev