hi guys!
given this simple document:
<?xml version = "1.0"?>
<metaKnowledge>
<metaInfo PID = "1">
<project
name = "open view"
UID = "0"
documentKey = "open view"
fileName = "open view"
version = ""
/>
</metaInfo>
</metaKnowledge>
i need to add a new element inside metaKnowledge. i am trying this XUpdate
query:
<xupdate:modifications version=\"1.0\"
xmlns:xupdate=\"http://www.xmldb.org/xupdate\">
<xupdate:insert-after select=\"metaKnowledge/metaInfo[last()]\">
<xupdate:update element name=\"project\">
<xupdate:attribute
name=\"name\">MegaProject</xupdate:attribute>
<xupdate:attribute name=\"UID\">1</xupdate:attribute>
<xupdate:attribute
name=\"documentKey\">MegaProject</xupdate:attribute>
<xupdate:attribute
name=\"fileName\">MegaProject</xupdate:attribute>
<xupdate:attribute
name=\"version\">null</xupdate:attribute>
A New Project Called MegaProject
</xupdate:element>
</xupdate:insert-after>
</xupdate:modifications>
can someone tell me if this query is formed right? if not, what's the right
query? i am always getting this error, try what i may:
org.xmldb.api.base.XMLDBException: Query Compilation Error
at org.apache.xindice.core.FaultCodes.createXMLDBException(Unknown
Source)
:
:
any help appreciated greatly!
TIA,
-nani