IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  Deleting documents after date?

    Posted Mon April 18, 2005 09:26 AM

    Hi,
    i want to delete documents (xml and nonxml) in a database which are older than for example 100 days. Is there any function or possibility
    to do this?

    CU
    FM_BAR


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: Deleting documents after date?

    Posted Mon April 18, 2005 10:42 AM

    I imagine that you would be able to do this using XQuery and the Tamino function getLastModified.

    Please practice on a test database until you are certain the delete query works as you expect!


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: Deleting documents after date?

    Posted Tue April 19, 2005 02:23 PM

    Thank you, that is what i searched for…

    But i have still a little problem:

    1. i can delete the xml-documents i have found with the query by using the xml-API, but i cannot find a “delete”-function in the non-xml-API?

    2. How can i delete with xquery? the “update delete” function
      is not able to delete documents, only nodes, without the root element.


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 4.  RE: Deleting documents after date?

    Posted Tue April 19, 2005 02:35 PM

    I think that you should be able to delete XML (and probably non-XML) documents using XQuery.

    The following thread probably helps in phrasing the XQuery to delete a document.

    http://tamino.forums.softwareag.com/viewtopic.php?p=2980


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 5.  RE: Deleting documents after date?

    Posted Mon April 25, 2005 11:33 AM

    Thanks for the link, now i have built a xquery to delete my documents if they are older than a specified date.
    But i am using the TamX.XQuery(…) function, so this only deletes xml documents.
    I have also a xquery, which deletes my text-documents, but how can i use this one in my programm?
    I cannot find a function for doing a xquery with the nonxml-API…


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 6.  RE: Deleting documents after date?

    Posted Mon April 25, 2005 11:44 AM

    I think that it should be possible to delete non-XML documents using XQuery.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 7.  RE: Deleting documents after date?

    Posted Wed April 27, 2005 02:00 PM


  • 8.  RE: Deleting documents after date?

    Posted Wed April 27, 2005 02:13 PM

    Thanks, now i have solved my problem, with this query i can delete NonXml-documents with the TamX-Api:

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    update for $i in input()//:text
    where tf:getInoId($i) = 1
    do delete $i/…

    This deletes the document with InoId = 1. I have defined a schema “text” in my collection and ‘text’ is a reserved word, so that i need the ‘//:’ before… i found this information also in the forum…

    Thank you very much for the help…


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods