Path Deletion Script

i currently have a script which contains a line for deleting all of the channels in a tif file:
activeDocument.channels.removeAll()
and this works fine.  i would like to add the necessary code to also delete all of the paths in a file.  i tried adding the line: activeDocument.paths.removeAll() but i received an error message.
does anyone know the correct way to do this?  please advise.
thanks.

John A Horner wrote:
thank you both so much for your replys.  it have incorporated your suggestions and the sript seems to be working fine.
i have one more related question: i notice that in some of the scripts i already have there is a semi-colon at the end of most of the lines but not all.  for example:
activeDocument.flatten();
activeDocument.channels.removeAll()
activeDocument.pathItems.removeAll();
does it make a difference one way or another?
finally, i am new to the forums and saw that i was only able to give 1 correct answer or 2 helpful so i wasn't sure the correct protocol for situations where there are 2 apparantly correct solutions.  but now, even though i have 2 correct solutions, it shows up as only "possibly answered".  is there a way to edit this?  please let me know if there is a proper way to handle this on the forums.  thanks again for everything.
jh
If you are flattening the document first, then the warning about deleting vector masks for the current layer won't apply to you, you are good to removeAll.
From what I remember, adding the ';' at the end of each line is 'proper' javascript, and I believe was once required. It often doesn't matter from what I've seen (I am often lazy and forget/neglect to use it myself) as many scripts will run just fine whether it is there or not. I believe it still is required in certain circumstances, although I am not completely sure what they are.
I don't know how the Adobe system uses it's points, not sure what to tell you on that.

Similar Messages

  • Help in DELETE script

    Hi, I have duplicate records and want to delete any 2nd duplicate row. Please help in DELETE script.
    Select * from cmhrec
    Sr_no  code    date     charge   Charge2 Code_ID
    1        AAA   1-1-2014  24.0      24.0      5
    1        AAA   1-1-2014  24.0      24.0      9
    2        AAA   1-1-2014  23.0      23.0      4
    2        AAA   1-1-2014  23.0      23.0      11
    3        AAA   1-1-2014   26.0      28.0     12
    3        AAA   1-1-2014   26.0      28.0     19
    --Desired output after deleting any 2nd duplicate row.
    Sr_no  code    date     charge   Charge2 Code_ID
    1        AAA   1-1-2014  24.0      24.0      5
    2        AAA   1-1-2014  23.0      23.0      4
    3        AAA   1-1-2014   26.0      28.0     12

    Thank you
    You can simply do this
    DELETE t
    FROM cmhrec t
    WHERE EXISTS
    SELECT 1
    FROM cmhrec
    WHERE SrNo = t.SrNo
    AND Code = t.Code
    AND Code_ID < t.Code_ID
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • "Echo" error from deletion script.

    Hey forum!
    I've got this deletion script (attached) that's throw back
    this error:
    Error: Error #2101: The String passed to
    URLVariables.decode() must be a URL-encoded query string containing
    name/value pairs.
    at Error$/throwError()
    at flash.net::URLVariables/decode()
    at flash.net::URLVariables()
    at flash.net::URLLoader/onComplete()
    I don't understand what the problem is. When i look up that
    error i find that usually that error is called by bad echoes, but
    my script doesn't have any. Any help or tips is appreciated!
    Thanks,
    John

    By the way, the script is working as intended.
    Thanks again

  • Is possible to separate path using script....?

    Hi Everyone,
    I have one overall path and two outer edge path.
    use overall path to separate each like pant and tops.
    Is possible to separate path using script. I have also tried script but is not working on second separation.
    can any rectify that script is possible...?
    -yajiv
    #target Photoshop
    app.bringToFront;
    var docRef = app.activeDocument;
    var myDocname=app.activeDocument.name
    var e=0
    try {
        var ecp=docRef.colorProfileName;
         var n=docRef.pathItems.length;
                        if(n>0){
                if(docRef.pathItems[0].name=="Path 1"){
                  var pathRef = docRef.pathItems[0].duplicate(); 
                  var path1=docRef.pathItems.getByName("1");   
                  //path1.duplicate();         
                  path1.select();
                  Path_copy();
                  var pathitem=docRef.pathItems.getByName("Path 1 copy");
                   pathitem.select();
                   Path_Paste();
                   pathitem.operation = ShapeOperation.SHAPEINTERSECT;
                   Path_Combine();
                   var path1=docRef.pathItems.getByName("1");  
                   var pathRef1 = path1.duplicate();
                   path1.select();
                   path1.remove();
                    var pathitem=docRef.pathItems.getByName("Path 1 copy");
                    pathitem.select();
                    pathitem.name="1";
                    var pathitem=docRef.pathItems.getByName("Box");
                    pathitem.select();
                    Path_copy();
                   var path1=docRef.pathItems.getByName("1 copy");  
                    path1.select();
                    path1.name="OL"
                    Path_Paste();
                    path1.operation = ShapeOperation.SHAPEXOR;
                    Path_Combine();
                   var pathRef = docRef.pathItems[0].duplicate(); 
                   var pathitem=docRef.pathItems.getByName("Path 1 copy");
                   pathitem.select();
                   Path_copy();
                   var path2=docRef.pathItems.getByName("OL");  
                   path2.select();
                   Path_Paste();
                   path2.operation = ShapeOperation.SHAPEINTERSECT;
                   alert(path2.operation);
                   Path_Combine();
    catch (e) {
       alert(e);
    //alert ("PSR_LWC_PLUS_V2_PT - Color Profile not Embedded...\n Check it out...!!!")
    function Path_copy(){
        var id200 = charIDToTypeID( "copy" );
        executeAction( id200, undefined, DialogModes.NO );
    function Path_Paste(){
        var id204 = charIDToTypeID( "past" );
        executeAction( id204, undefined, DialogModes.NO );
    function Path_Combine(){
                var idcombine = stringIDToTypeID( "combine" );
                    var desc26 = new ActionDescriptor();
                    var idnull = charIDToTypeID( "null" );
                        var ref25 = new ActionReference();
                        var idPath = charIDToTypeID( "Path" );
                        var idOrdn = charIDToTypeID( "Ordn" );
                        var idTrgt = charIDToTypeID( "Trgt" );
                        ref25.putEnumerated( idPath, idOrdn, idTrgt );
                    desc26.putReference( idnull, ref25 );
                executeAction( idcombine, desc26, DialogModes.NO );

    Hi c.pfaffenbichler,
    Finally with your guidance I rectify the script error.
    Thank you for your time and knowledge, I really do appreciate it.
    Once again Thanks for your continue support.
    "Wish you Happy successful New Year - 2012...!!!"
    Regards
    -yajiv....
    Here is the Code.....!
    // create path intersections;
    // 2011; use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.POINTS;
    var theArray = new Array;
    var theNumber = myDocument.pathItems.length;
    // »simplify« paths and collect components;
    for (var m = 0; m < theNumber; m++) {
              myDocument.pathItems[m].select();
              combinePath();
              theArray.push(collectPathComponents(myDocument, myDocument.pathItems[m]));
          var OV_Path=myDocument.pathItems[0]
        // create intersections;
        for (var n = 1; n < theNumber; n++) {
            //alert(OV_Path);
              var theFirst = collectPathComponents(myDocument,OV_Path );
              var theSecond = theArray[n];
              for (var a = 0; a < theSecond.length; a++) {
                        theFirst.push(theSecond[a]);
              var thePath = createPathFromPathComponentActionDesc(theFirst, "intersect",0);
              makePath(myDocument.pathItems[0].name+" intersected with "+myDocument.pathItems[n].name);
              combinePath();
    // create subtraction;
        var theFirst = collectPathComponents(myDocument, myDocument.pathItems[0]);
        for (var o = 1; o < theNumber; o++) {
                  var theSecond = theArray[o];
                  for (var a = 0; a < theSecond.length; a++) {
                            theFirst.push(theSecond[a])
        var thePath = createPathFromPathComponentActionDesc(theFirst, "subtract",1); // Modify the parameter, add flag for function
        //subtract
        makePath("all others subtracted from "+myDocument.pathItems[0].name);
        combinePath();
    // reset;
    app.preferences.rulerUnits = originalRulerUnits;
        function combinePath () {
        // =======================================================
        var idcombine = stringIDToTypeID( "combine" );
            var desc4 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref3 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref3.putEnumerated( idPath, idOrdn, idTrgt );
            desc4.putReference( idnull, ref3 );
        executeAction( idcombine, desc4, DialogModes.NO );
        //components correspond to subPathItems,  subpathList contains the actual paths than can make up one subPathItem ;
        ////// collect path infor from actiondescriptor //////
        function collectPathComponents (myDocument, thePath) {
            //var myDocument = app.activeDocument;
            var originalRulerUnits = app.preferences.rulerUnits;
            app.preferences.rulerUnits = Units.POINTS;
            // based of functions from xbytor’s stdlib;
            var ref = new ActionReference();
            for (var l = 0; l < myDocument.pathItems.length; l++) {
                      var thisPath = myDocument.pathItems[l];
                      if (thisPath == thePath && thisPath.name == "Work Path") {
                                ref.putProperty(cTID("Path"), cTID("WrPt"));
                      if (thisPath == thePath && thisPath.name != "Work Path" && thisPath.kind != PathKind.VECTORMASK) {
                                ref.putIndex(cTID("Path"), l + 1);
                      if (thisPath == thePath && thisPath.kind == PathKind.VECTORMASK) {
                   // var idPath = charIDToTypeID( "Path" );
                    var idPath = charIDToTypeID( "Path" );
                    var idvectorMask = stringIDToTypeID( "vectorMask" );
                    ref.putEnumerated( idPath, idPath, idvectorMask );
             var desc = app.executeActionGet(ref);
            var pname = desc.getString(cTID('PthN'));
            // create new array;
            var theArray = new Array;
            var pathContents = desc.getObjectValue(cTID("PthC"));
            var pathComponents = pathContents.getList(sTID('pathComponents'));
            for (var m = 0; m < pathComponents.count; m++) {
            var comp = pathComponents.getObjectValue(m);
            var subPathList = comp.getList(sTID("subpathListKey"));
            var shapeOp = comp.getEnumerationType(sTID("shapeOperation"));
            //alert("shapeOp - "+shapeOp);    q
            theArray.push([comp, subPathList, shapeOp]);
            // by xbytor, thanks to him;
            function cTID (s) { return cTID[s] || cTID[s] = app.charIDToTypeID(s); };
            function sTID (s) { return sTID[s] || sTID[s] = app.stringIDToTypeID(s); };
            // reset;
            app.preferences.rulerUnits = originalRulerUnits;
            return theArray;
        ////// create a path from an array of pathcomponents //////
        function createPathFromPathComponentActionDesc (theArray, shapeOperation,flag) {
        cTID = function(s) { return app.charIDToTypeID(s); };
        sTID = function(s) { return app.stringIDToTypeID(s); };
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putProperty(cTID('Path'), cTID('WrPt'));
        desc1.putReference(sTID('null'), ref1);
        var list1 = new ActionList();
        for (var m = 0; m < theArray.length; m++) {
                  var desc37 = new ActionDescriptor();
                  if (m == 0 && flag=0) {
                            desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Intr'));
                  else  if (m == 0 && flag=1) {//Modify mode to exclude.....!
                             desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), theArray[m][2]);
                  else {
                            switch (shapeOperation) {
                                      case "intersect":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Intr'));
                                      break;
                                      case "subtract":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Sbtr'));
                                      break;
                                      case "exclude":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), 696);
                                      default:
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), theArray[m][2]);
                                      break;
                  var list5 = new ActionList();
                  desc37.putList(cTID('SbpL'), theArray[m][1]);
                  list1.putObject(cTID('PaCm'), desc37);
        desc1.putList(cTID('T   '), list1);
        executeAction(cTID('setd'), desc1, DialogModes.NO);
        ////// make work path regular path //////
        function makePath (aName) {
        // =======================================================
        var idMk = charIDToTypeID( "Mk  " );
            var desc4 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref2 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                ref2.putClass( idPath );
            desc4.putReference( idnull, ref2 );
            var idFrom = charIDToTypeID( "From" );
                var ref3 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                var idWrPt = charIDToTypeID( "WrPt" );
                ref3.putProperty( idPath, idWrPt );
            desc4.putReference( idFrom, ref3 );
            var idNm = charIDToTypeID( "Nm  " );
            desc4.putString( idNm, aName );
        executeAction( idMk, desc4, DialogModes.NO );

  • Encoding error occurs using parameter "default path for scripts"

    Hello,
    assume we have a script "/home/artur/tymczasowe/test.sql". I can execute it using SQL Developer by:
    @/home/artur/tymczasowe/test.sql
    Everything works as expected.
    Then I set parameter "Tools - Preferences - Database - Worksheet - Default path to look for script" to "/home/artur/tymczasowe" and executed:
    @test.sql
    This time national characters has been lost, everyone replaced with "�".
    The script content:
    --create table a(enc varchar2(8), data varchar2(255));
    delete from a;
    insert into a(enc, data) values ('cp1250', 'zażółć gęślą jaźń');
    commit;
    Operating system is Debian Squeeze amd64, Developer version is 3.1.07, Build MAIN-07.42. This problem occurs using previous, 3.0.* versions too.

    Hi user633485
    Logged bug:
    Bug 13779254 - ENCODING DEFAULTS TO NATIVE RATHER THAN IDE SETTING USING DEFAULT PATH
    -Turloch
    SQLDeveloper Team

  • Defining paths in scripts..... in need of a guru

    Here's a problem that Bridge scripts are having...
    If you have a volume named Users, the image processor, 1-2-3, AOM scripts won't run because as the paths are defined they will look in the volume "User" not the folder "Users" for files etc.... it's described better here:
    http://forums.adobe.com/message/3477465#3477465
    the problem also exists if you try to use the merge HDR pro script, if you have a volume named "Applications" on your desktop.
    here's the KB for this similar problem:
    http://kb2.adobe.com/cps/852/cpsid_85275.html
    you can replicate these problems by simply naming any external drive "Users" for the output script errors, or "Applications" for the HDR script errors. After renaming simply try any of the above scripts.
    Adobe is currently looking into fixing the scripts, but I know there are some scripting gurus around here that might have already encountered these types of problems and might have a speedy fix to the problem.... any thoughts?
    many thanks.
    j
    -- I should also mention this is a Mac only problem.

    As long as there is mankind, and technology there are going to be problems!
    There's nowt wrong with my N95-1 and I'll be sticking with it for some time.
    You can get a bad phone - just like you can get a bad car, washing machine, stereo etc, etc.
    As long as the phone works OK there are often ways of improving limitations. Battery life is poor on my N95 'computer' but I have a rechargeable li-polymer external battery pack I bought for use with a PDA, it's very pocketable, reasonably light weight and would give me about 3 x recharges of my N-95.
    Frankly though I would avoid the N95 8GB - I don't like the idea of fixed memory and no memory card slot. If that fixed memory goes pear shaped, what then? At least with removable flash memory you can whip it out and put another one in. Micro SD-HC cards are expected to go up to at least 32GB in size, they are very small, very light and as is usually the case, they will eventually fall in price.
    Horses for courses! Good luck with whatever model you decide to get.Message Edited by keenas on 27-Oct-200709:19 AM

  • Default path for scripts within SQL Developer version 3.2.20.09.87

    I have SQL Developer version 3.2.20.09.87 and needed to know if the 'Set default path to look for scripts' be a UNC path?
    Thanks

    I hadn't tried it but now I did and it worked.
    I also tried setting the Utilities Export default file location to a UNC path and I was able to set it but when I try to go to it via the 'browse' button, it doesnt go to it. It does, however, use it when I export.
    Also when I do File > Open, I'm not able to navigate to UNC paths via the 'Home' or 'Desktop' buttons on the left hand side of the window and am not able to navigate to a network location from the 'Locations' box.
    Any ideas? I am on Windows 7.
    Thanks

  • Not able to access local path for script file

    Hi All,
    I am integration my application (built in Asp.Net/Vb.Net) with InDesign Server CS4.
    InDesignServer is installed on separte machine other than the machine on which application is running.
    All of the scripts and indd files are placed on the machine (on which application is running):
    When I send SOAP request to the InDesign Server from my application. I get following error:
    "Cannot find the folder for the script "C:\ Path of the Script (.jsx)"
    Please let me know how to manage this error.
    It would be great if I get following doubts clerified:
    1. Is it required to put network-path for the script files when InDesign Server is running on different machine and client machine is on other machine?
    Kind Regards...
    Prashant

    I get the same error, I'd like to know if anybody can help me here??

  • How to excute a power shell script to remote machine using power shell script folder path and script name

    Hi,
    Let say, I have 3 parameters.
    1. Script FolderPath (Remote path for e.g \\RD101\ScriptSharedFolder     Here RD101 is one server)
    2. Script Name(StopAllService.ps1)
    3. Server Name (RD45)
    I want to execute a powershell scritp in my local machine(Test1)  and in that script I want to pass the above three parameters.Now I want to excute the StopAllService.ps1 script into RD45 server. But the script is available in RD101 machine.
    So What I want to here How can we do this ? I have script name and script folder path and target execution server name.
    Pls giude me or give me the script.
    By
    A Path Finder..
    JoSwa 
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi,
    You got 2 solutions for your problem:
    1- If you have permission to run scripts in the remote computer without specifying your credential,
    then, the first reply solve your problem.
    2- If you have permission to run scripts in the remote computer
    having to specify your credential, l then,
    my solution solves your problem.
    If the remote computer requires signed scripts only, you need signed script. Period. Or are you trying to break remote computer security?
    If you need signed script, there's no psdrive that'll circumvent such requirement.
    The problem is that the execution policy is set to "RemoteSigned". Using the URL explicitly tags that script as being from a remote source, and the policy blocks it.  The PSDrive provides a local reference for the script.  It does not
    sign the script but the local drive reference may prevent it from being blocked for being from a remote source. I'll test that later.
    Script signing is not and should never be considered a security measure. It is easily circumvented by running the script using powershell.exe, and using the -ExecutionPolicy parameter to override whatever the local execution policy setting is. 
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • CUP Connector Deletion script

    Hi everyone,
    I have, yet again, an issue, and this time, it's with deleting data.  For the purpose of this discussion, we are working on our sandbox system.
    In our CUP issues from the past (SUMMARY: BASIS upgraded, without letting us know, and now our AE 5.2 is not working, and we are trying to figure it out), we finally went to SAP and now SAP is trying to run some of their scripts to get to the bottom of our issue.
    It turns out we have a few connectors in CUP, with roles associated with them, that aren't really connected to any system.  These connectors were created as place holders for non SAP systems so that "roles" on those systems could be included in requests and they could flow through the workflow.
    Anyway SAP says that's not going to work - either the connectors should be in working order or they need to be deleted, since deactivating the connectors still prevents their testing from proceeding.
    However, deleting the connectors isn't easy - CUP won't let me delete the connector as roles are associated with them, and there are also requests (test requests from the past) that are associated with those connectors.
    SAP came back with a list of tables from where we can go through and just delete the rows of data that are associated with the connectors. 
    Before doing something like that, I wanted to get your thoughts and know if there are any scripts that have already been put together for such a purpose.
    Thanks,
    Santosh

    Hello Santosh,
       SAP did used to provide scripts to delete data from GRC applications. Requests from CUP, Management reports data from RAR etc.. This was the way earlier as there was no way available from within the applications to delete this sort of data.. Connectors in GRC applications cant be deleted without deleted associated data and scripts were used earlier to accomplish this task..
    I would still recommend that you take backup of GRC database so that it could be restored in case..
    Regards, Varun

  • Master Data SID table path deleted

    Hello BW Gurus,
        I have a Master Data InfoObject.  i was doing something in development and by mistake I deleted the MasterData table(I gave the master data table path in tcode se14). Now I When I go into Master data tab,I dont see SID table path anymore.    
       When I browse the Maintain masterdata,I see some data and when I say display data,I dont see any. I dont know whats going on with this object. Can someone tell how do i get the SID table path in the Masterdata tab of this object.
    Thanks in advance
    Neo

    Trt activating the info object in RSA1.
    Ravi Thothadri

  • Shake on a new Mac (path to scripts is different)

    I have recently moved Shake from a G5 to a Mac Pro.
    If I open Scripts I created on the G5 the path to my data volume (which is the same external drive I was using) is relative to the G5
    i.e. there is an identifier in the path (....g5/Volumes/Scratch Disk/...etc)
    Is there a way to change this path globally in Shake to remove all the bits before Volume?
    Otherwise I have to reload every File-in for every project!

    Have realised this probably can't be done because the problem is in each Script file (not a Shake pref).
    Ok have found a workaround.
    If I change the path in the Script using textedit for each FileIn, that works (a lot quicker copy/pasting than manually loading each piece of media).
    Thanks anyway.

  • Recover the deleted script

    Hi all,
    By mistake one script is deleted from the system from the
    local ( $TMP ) directory ( package ).
    Is there any way to get back the script....
    Thanks and Regard,
    Santhosh

    Database backup.
    A

  • Get path of script you're running

    I know you can get path of the documet you're working on activeDocument.path, but can you get the path of the script you're running as well?

    If you want the path of a running script you could use..
    function WhoAmI() {
    var where;
    try {var F = FO;
      }catch( err ) {where = File(err.fileName);}
    return where;
    As for using:-  photoshop.executeScript (photoshop.jsx);
    This is supposed to do an eval, so it's not executing "photoshop.jsx" it is trying to evaluate it into a command.
    I have never seen a working example of executeScript and have never managed to get it to work.

  • How can I delete Scripts from my Apple Cmptr?

    I downloaded Scripts from your website. I don't like it. How can I delete this?

    Is that an extensions or a theme (persona) (Tools > Add-ons) ?
    See:
    *http://kb.mozillazine.org/Uninstalling_add-ons
    *http://kb.mozillazine.org/Uninstalling_toolbars
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • After BIOS update numpad on my Satellite C850 is not working properly

    My numpad started going crazy. All I can use are these "0.369*-+ home button end button PGUP and PGDN " The numpad light is on and I cant turn it off. whenever I do this its like Im pressing the FN button and whenever I press numpad 1 it always type

  • How to create a generic TYPES?

    hello! what i try to do is following eg: when i call my function the user has the possibility to check the flag "show_button = 'X', and exports a table when this flag is checked i want to display an icon in the first row of this table, so i need to e

  • IMPDP: The job SYS_IMPORT_FULL_01 has halted due to a fatal error

    Hi, I'm having problems importing a database whose export was successful. The tool I'm using is expdp and impdp. The source schema is in a tablespace different from the target schema, but in the same instance of the Oracle database. I granted the rol

  • Grant login Access to Sql Server to a User on Windows 8

    Hi! We have Sql Server installed on Windows 8.1 PC and on this PC, we have multiple Users with Microsoft email accounts. As we just migrated from WIndows 7 to WIndows 8, I am finding it challenging to grant permissions to every User with an account o

  • Java - XML Conversion

    Hi, I believe this is possible but cannot determine what Toplink API to use from the documentation. I'd like to convert a simple Java Object (with just standard getter and setter methods) into an XML string IN MEMORY, then from that String, back to t