How to separate the content of the XML element

Hi all

How can we separate content of the XML element in two strings, where each string will be copied to new variables.

For ex:
The entry that I get is

C:/documents/sharedFiles/Apple.PDF < XmLElement > < / XMLElement >

now I want to break the content into two parts as

< yyyy > C:/documents/sharedFiles / < / aaaaa >
Apple.PDF < bath > < / bath > (I want to separate the file name string)

and now I want to copy it in two other variables. How can I achieve this in BPEL. Appreciate your help.

Thank you

Published by: kameshb on March 25, 2013 11:16

Hi Philippe,.

I tried this on a simple XSL and achieve the desired results:

Entry:
------------

C:/test/dummy/post/test.PDF










It will be useful.

Thank you
Deepak.

Tags: Fusion Middleware

Similar Questions

  • How to separate the different elements of a composite image in separate layers?

    Hi guys,.

    I hit a road block, and I was wondering if someone could help me go beyond this.

    Basically, I have this image:

    [IMG] http://i50.Tinypic.com/13z06jn.jpg [line]

    and in the upper part of it going to the text (the title of the article).

    However, I would like for the text to go behind the head of John Marston (the man in the image), but obviously not behind the background.

    The problem I'm having is, it is a single image. I was wondering, is it possible to separate the image of the man in the background so that I can raise above the text, or a way to move the text behind him, but not behind the background?

    Or a completely different solution that I have completely forgotten? Apologies if it's very simple and it looks like I'm wasting your time. I don't claim to be an expert with Fireworks!

    Thank you in advance to anyone who is able to help me with this problem.

    Sincerely,

    Jack606.

    Use the polygon tool to draw around the figure. Once tracing has been finished, and you see what looks like the mobile dotted line that surrounds it, choose the Edition command > copy, then select > deselect and then click on the regular pointer tool, choose the command Edition > paste. That will stick in a copy of the figure you traced, which allows you to add text behind it. I made a copy for you that you will be able to edit in Fireworks.

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • How to pass the content of an xml element in the text frame in inDesign Script

    var XMLFile = File.openDialog ("select XML Files... ») ;

    var doc = app.activeDocument;

    If (!) App.Documents.Length)

    {alert ("ERROR: Document not opened");}

    return;

    }

    doc.importXML (XMLFile);

    var firstFigureNode = doc.xmlElements [0] .xmlElements [1] .xmlElements [0];

    var lableNode = firstFigureNode.xmlElements [0];

    var lableNodeText = lableNode.contents;

    myFrame var = doc.textFrames.add ({geometricBounds: [-13, 13, 3, -3]});

    lableNodeText.move (LocationOptions.AFTER, myFrame.texts [0]);

    ========================================================

    My requirement is: == > > move the content of an xml element in the text by inDesign Script block, but XML InDesign file Structure should not be change & data in the XML Structure should remain as it was before...

    I tried to code above, but it does not work...

    Please can someone help me in solving this problem...

    It does not work correctly...

    It moves firstFigureNode in myFrame...

    firstFigureNode.placeXML (myFrame);

    ===>> For Apple Script try below Code ===>>

    myFrame markup using firstFigureNode

  • How to add content in the xml element?

    I need to insert a word sqrt (plain text without tags) in the xml element of m:msqrt as below:

    enter image description here

    I tried,

         

    var path = (app.activeDocument.fullName.parent.fsName) m:System.NET.SocketAddress.ToString () replace (/ \ / g, ' /'); document path (sample.indd) active

    var xmlPath = (app.activeDocument.fullName.parent.fsName) m:System.NET.SocketAddress.ToString (.replace(/\\/g, '/')) + "" / with_aid2.xml ";"

    xmlFile = file (xmlPath);

    {if (xmlFile.Exists)}

    xmlFile.open ();

    var myString = xmlFile.read ();

    xmlFile.close ();

    myXml = new XML ();

    myXml = XML (myString);

    var msqrtCount = myXml.xpath("//m:msqrt");

    } else {alert (xmlPath + "does not exist!") ;}}

    for (var i = 0; i < msqrtCount.length (); i ++) {}

    var added = msqrtCount [i];

    added.contents = "sqrt";

    }

    I get an error indicates the invalid content property.

    Try this,

    var myDoc = app.activeDocument;
    mySqrtTag(myDoc)
    function mySqrtTag(elm)
    {
        for (var i = 0; i < elm.xmlElements.length; i++)
        {
            if(elm.xmlElements[i].markupTag.name.toString() == "m:msqrt")
            {
                elm.xmlElements[i].insertionPoints[0].contents = "sqrt";
            }
            mySqrtTag(elm.xmlElements[i]);
        }
    }
    
  • How to separate the data from the reports

    Capture2.PNG

    I wanted to ask, how to separate the data in a single page, in the left side of page 1and then the right side of the page 2

    Thank you

    my report layout.

    you have to find the solution.

  • Loop through all of the xml elements

    How do I loop over all xml tagged in a story? I created a reference to the xml elements of the story I want to like this:

    var xmlStory = myDoc.xmlElements[0].xmlElements[0];
    

    In this structure, I have items < v > 10 / < v >, which I want to change of < id v '10' = > 10 / < v >. I want to do in the InDesign scripting and not with XSL export because of workflow, I plan. I know I can loop on children in the structure like this:

    for(var i=0;i<xmlStory.xmlElements.length;i++){
                        if(xmlStory.xmlElements[i].markupTag.name == "v"){
                                  xmlStory.xmlElements[i].xmlAttributes.add("id", xmlStory.xmlElements[i].contents);
                       }
             }
    

    This works very well for the first level, but I want to find all elements with the tag '< v >. These tags can appear at any level in the structure. How can I make sure that all of them are included and not just the first elements of the child of the element of the story?

    Try this,

    #target inDesign;

    var doc = app.activeDocument;
    xmlTag var = doc.xmlElements [0];
    var vTag = xmlTag.evaluateXPathExpression("//v")
    for (var i = 0; i)<>
    {
    Try
    {
    vTag [i].xmlAttributes.add ("id", vTag [i].xmlContent.contents)
    }
    {catch (e)}
    }

  • Create the XML element for the cell in the chart CC2015

    Hello world

    I am currently working with the xml element.

    And I want to create xml, table cell element.

    For now, I can create xml for the graphic cell by select graphic image of that cell, and then call the AutoTag() function.

    But I want to create an xml element of a chart without selected cell.

    I found the function () Utils < IXMLElementCommands >-> CreateElement()

    but it doesn't seem to work with a graphic table cell structure.

    Does anyone know how to do?

    Thanks in advance.

    Try,

    InterfacePtr cellContent (tableModel-> QueryCellContentBoss (gridAddress));

    if(cellContent == Nil) {}

    break;

    }

    InterfacePtr cellXMLReferenceData (cellContent, UseDefaultIID());

    {if(!cellXMLReferenceData)}

    break;

    }

    XMLReference cellXMLRef is cellXMLReferenceData-> GetReference();.

  • Apply the style of Pará to the xml element based on the type of master page?

    IM using a flow xml, im importing the xml to be used across different master page templates and I want to apply paragraph styles different items depending on what master page xml, they are on...

    So I have 3 put templates in place

    Type of page 1

    Type of page 2

    Type of page 3

    and 3 paragraph styles

    style 1

    style 2

    style 3

    I have the same xml structure deposited on each page...

    < Entry >

    < name > Page < / name >

    < / name >

    So, can I use javascript to apply the paragraph (style 1) style to the xml element (name) on any page that uses the master page (type of Page 1)

    Is this possible? whether and how this could be done?

    Thanks in advance

    Hello

    Try:

    #include '... / XML rules/glue code.jsx ";

    myDoc var = app.documents.item (0);

    var myRuleSet = new Array (new applyParaStyle());

    {with (MyDoc)}

    var elements = xmlElements;

    __processRuleSet (Elements.Item (0), myRuleSet);

    }

    function applyParaStyle() {}

    myIdName = "Xp".

    This.XPath = "//restaurant_name";

    This.Apply = function (myElement, myRuleProcessor) {}

    {with (MyElement)}

    {Switch(insertionPoints[0].parentTextFrames[0].) ParentPage.appliedMaster.Name)}

    case "X-Master:

    App.Select (texts);

    App.Selection [0]. FillColor = myDoc.colors.item ("xxxx");

    break;

    case 'guide-Scotland:

    App.Select (texts);

    App.Selection [0]. FillColor = myDoc.colors.item ("scotland");

    by default:

    break;

    }

    }

    Returns true;

    }

    }

  • How to resize the window elements 11 photoshop on mac? no green +.

    How to resize the window elements 11 photoshop on mac? No button green + out of the screen.  cannot resize monitor - no option on macpro

    Go to System Preferences > displays and your descent of resolution. Let the OS X to open with the new resolution. Place it back up to the highest available resolution and the window should position themselves correctly.

  • I need the XML elements appear in the various paragraphs...  Could do with a script?

    I need of the XML elements appear in different paragraphs ...
    Pourrait to do this with a script?

    Thank you...

    You can use this / Puedes usar esto

    insertTextAsContent("\n",XMLElementPosition.beforeElement);
    //  or
    insertTextAsContent("\r", XMLElementPosition.afterElement);
    

    Necesitaria mas information,

  • XML: contents.replace () destroyed XML elements inside

    Hello

    I wrote a script XML rule where all the < ul > < li > is mapped to a paragraph style that uses bulleted lists. It is possible that returns occur inside the < li > elements. Before you go through the items and by applying styles with a script rule, I tried to change the return (\r) of returns (\n) cycling through all the < li > with this code:

    _node.contents = _node.contents.replace(/\r/g, '\n');  //change all returns inside <usp><li> to newline
    

    But I realized that, when there are other XML elements (for example < em > or < strong >) inside the < li >, these elements have been killed by my call of. replace().

    So my question: How can I reach evolution \r's to \n's and keep inside XML structure?

    Thanks in advance

    Tobias

    I did it with this chiseled script - function grep with emphasis on the XML element - executed after that all XML was processed and placed in the document:

      // change \r to \n in usp's li's
      app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING;
      var _root = _dok.xmlElements[0];
      var _nodeList = _root.evaluateXPathExpression("//li");
      app.findGrepPreferences.findWhat = "\\r"; app.changeGrepPreferences.changeTo = "\\n";
        for ( i = 0; i < _nodeList.length; i++ ) {
            var _node = _nodeList[i];
            if ( _node.contents != "" ) {
                _node.changeGrep();
            }
        }
      app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING;
    

    It works perfectly. Any other suggestions?

    Thank you

    Tobias

  • How can I transfer content from an XML file in a MS SQL database of the stored procedure using LabWindows/CVI SQL Toolkit?

    Hello

    I have a problem to transfer content to an XML file in a MS SQL database through a stored procedure data/fixed. I am able to transfer the content of the file using method...

    HSTMT = DBPrepareSQL (hdbc, EXEC usp_InsertReport " ... ");

    resCode = DBExecutePreparedSQL (hstmt);

    resCode = DBClosePreparedSQL (hstmt);

    ... but in this case, I am not able to read the return value of the stored procedure.

    I tried to follow the example of the stored procedure in the help documentation (DBPrepareSQL), but I miss a xml data type?

    No idea how to solve my problem?

    Cake of KR

    DianaS salvation,

    Thanks for your comments. During this time I found another way which fullfill my needs:

    resCode = DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_TEXT);

    sprintf (sz_SqlStatement, "DECLARE @TESTID INT EXEC @TESTID = usp_InsertReport ' SELECT 'RetVal' %s = @TESTID", sz_Buffer ");
    HSTMT = DBActivateSQL (hdbc, sz_SqlStatement);

    While ((resCode = DBFetchNext (hstmt)) == DB_SUCCESS)

    {

    / * Enter values in the record. */

    resCode = DBGetColInt (hstmt, 1, & s32_TestId);
    }

    resCode = DBDeactivateSQL (hstmt);

    sz_Buffer is the content of the XML file.

    Cake of KR

  • How to remove the XML prologue in Oracle?

    Our system works as follows:

    1. place a piece of XML code in the database as a CLOB
    2 database converts this value to XMLTYPE (stored as a CLOB (you can skip this, Marco * {;-)))))
    3. a request then reads XML from the database and inserts it into another bit of XML
    4. the application continues his treatment based on this new composite XML.

    So far, the XML that is loaded into the database in step 1 (for various systems) has never contained a prologue. However, a new system came along and is now passing in a prologue. There are problems of application in step 3.

    Apart from trying to get the new system do not spend in the prologue, is there a way to remove it of in Oracle?

    I came up with two solutions are not elegant:

    1. use XMLTABLE to retrieve the main root node (which might be different, depending on the system sent in the data and could change)
    2 convert the prologue in a commentary, using REPLACE the product, before converting the CLOB in an XMLTYPE.

    If I was forced to use one of the following methods, I would go with 2, but I really, really hope that there is a better way to do it.

    Someone at - it any other suggestions, please?

    PS. We are currently on 10.2.0.4 and are about to move to 11.2.0.3, but the solution is to work on both versions, for more fun and excitement!

    It's error, the application gives: "error obtaining Exception of SAX for additional information: no processing instruction begins with"xml"" who says that the app dev is due to the presence of the prologue in the middle of xml, the app has build up.

    So, basically, the app just "glue" XML in the middle of the other regardless of the structure? What kind of design is?
    IMO, the application needs to be fixed, not the XML input.

    A lot about how to add the prologue, nothing on how to remove it!

    You can use the XMLQuery function to get the root element:

    SQL> create table tmp_xml3 of xmltype
      2  xmltype store as basicfile clob;
    
    Table created
    
    SQL> insert into tmp_xml3 values (xmltype(''));
    
    1 row inserted
    
    SQL> select * from tmp_xml3;
    
    SYS_NC_ROWINFO$
    --------------------------------------------------------------------------------
    
    
    SQL>
    SQL> select xmlquery('*' passing object_value returning content)
      2  from tmp_xml3;
    
    XMLQUERY('*'PASSINGOBJECT_VALU
    --------------------------------------------------------------------------------
    
     
    

    Published by: odie_63 on August 22, 2012 15:26

  • How to separate the Raw files of the photo library

    My photo library is over 700 GB. I have a lot of raw files that are 30 MB or more. How can we separate the raw files in a separate file or a separate library?

    Duplicate your photos library in the Finder and then remove all the BULLIES of the first library photos and all photos that are not the RAW files of the second library.

    You can search for RAW photos with a smart album:

    File > new Smart Album

    Then set the rule set to "picture is GROSS."

    Of the other library use the rule 'The Photo is not BELIEVED'.

Maybe you are looking for