Hey Alan

Displaying the table using XPath expressions is pretty easy. Right now
though updating a document via an XPath expression is pretty hard stuff.
XPath is generally used to evaluate expressions on existing documents - its
rarely used to actually update documents 'in place'.

Though I think it'd be cool to support a subset of XPath for update
purposes. Quite a few people seem to want this feature. e.g. you could do
something like

update( document, "/foo/bar/@x", "Some value" );

For some xpath expressions this makes sense, though for others like
'count(/foo/bar)' don't make sense though. It'd take some hacking to get the
Jaxen XPath engine to be able to support this but it would be kinda cool if
we could do this.

James
----- Original Message -----
From: "Alan O'Leary" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 9:30 AM
Subject: [dom4j-user] TableModel.


> Hello,
> I am currently looking at the new TableModel approach that is in
> the latest release. I am trying to extend this TableDemo example to make
> it editable etc...
>
> This is as a Swing/<dom4j> learning exercise...
>
> What I have set up is a Tree and Table and the Tree uses the tree model
> and on node selection the 'branch' of the tree is used to display a
> table (using a table definition)
>
> All this works now BUT I when I edit a cell I cannot get back a node
> within the document...
>
> (Basically I am building a little XML editor as I thought that would be
> a good way to learn this stuff quickly)
>
> What I am wondering is that I have access to a Row XPath and Column
> XPath expression ....
>
> Is this the key or is there a better way ?
>
> So I have overridden the :
>
> 'public void setValueAt(Object aValue, int rowIndex, int columnIndex)'
>
> but don't know how to modify / access the correct cell the document...
>
> Any help appreciated ...
>
> Basically I would like to use the TableDefinition approach rather than
> hard coding a table model...
>
> Regards
> Alan
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user


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

Reply via email to