Getting a complete portion of an XML String (With tag names)

Im working on an application that processes a huge amount of xml strings. Im using xpath since it makes it much easier to select and navigate through the tags. The only thing I can't do is get a complete portion of an XML string, for example, if i have
<article>
<articlebody>
</articlebody>
<references>
<reference id="1"> ... </reference>
<reference id="1"> ... </reference>
<reference id="1"> ... </reference>
</references>
</article>
I need to get the complete <reference> portion to parse later, so i need the following string:
<references>
<reference id="1"> ... </reference>
<reference id="1"> ... </reference>
<reference id="1"> ... </reference>
</references>
How can i do this using xpath? is it even possible? if not how else can i do it? (don't want to use regular expressions and string manipulation)
Thanks for you help

Im not sure if this really qualifies as using DOM, but this is all i do to get the data i want from the files (when i only want to get the text value of an element:
InputSource inputSource = new InputSource(new StringReader(metadata));
return xpath.evluate(expression, inputSource, returnType);where metadata is a String containing meta data, and return type is usually string or number.
Im using Java 5 and
Could you please explain a little more how to do this?
Thank you

Similar Messages

  • Parsing XML string with XPath

    Hi,-
    I am trying to parse an XML string with xpath as follows but I am getting null for getresult.
    I am getting java.xml.xpath.xpathexpressionexception at line where
    getresult = xpathexpression.evaluate(isource); is executed.
    What should I do after
    xpathexpression = xPath.compile("a/b");in the below snippet?
    Thanks
    String xmlstring ="..."; // a valid XML string;
    Xpath xpath = XPathFactory.newInstance().newPath();
    xpathexpression = xPath.compile("a/b");
    // I guess the following line is not correct
    InputSource isource = new inputSource(new ByteArrayInputStream(xmlstring.getBytes())); right
    getresult = xpathexpression.evaluate(isource);My xml string is like:
    <a>
      <b>
         <result> valid some more tags here
         </result>
      </b>
      <c> 10
      </c>
    </a>Edited by: geoman on Dec 8, 2008 2:30 PM

    I've never used the version of evaluate that takes an InputSource. The difficulty with using it is that it does not save the DOM object. Each expression you evaluate will have to create the DOM object, use it once and then throw it away. I've yet to write a program that only needs one answer from an XML document. Usually, I use XPath to locate somewhere in a document and then read "nearby" content, add new content nearby, delete content, or move content. I'd suggest you may want to parse the XML stream and save the DOM Document.
    Second, all of the XPath expressions search from a "context node". I have not had good luck searching from the Document object, so I always get the root element first. I think the expression should work if you use the root as the context node. You will need one of the versions of evaluate that uses an Object as the parameter.

  • Escape XML Strings with JDK class

    Hi,
    can anyone tell me how to escape XML-Strings with classes of the JDK?
    When searching I only was pointed to StringEscapeUtils from apache.commons.lang, but we would prefer to use the JDK instead of integrating an external lib.
    Our aim is to escape an XML attribute, so a CDATA is not applicable for us in this case.
    Thanks
    Jan

    I implemented it by myself:
    public static String escapeXmlAttribute(String attributeValue) {
            StringBuffer result = new StringBuffer();
            for (int c = 0; c < attributeValue.length(); ++c) {
                if (attributeValue.charAt(c) == '"') {
                    result.append("&#34;");
                } else if (attributeValue.charAt(c) == '&') {
                    result.append("&#38;");
                } else if (attributeValue.charAt(c) == '<') {
                    result.append("<");
                } else if (attributeValue.charAt(c) == '>') {
                    result.append(">");
                } else {
                    result.append(attributeValue.charAt(c));
            return result.toString();
        }{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can i have xml elements with same name but one is having attrbt..?

    Hi all,
    I am suppose to take input from one system into BPEL.That system is auto gererating xml file. But that file is strange. It has two xml element with
    same name but with completely different sequence. First one is having two comlexTypes while second is having 5 simple types.
    Now the difference is First element is having attribute while second is not.
    So is that file is correct.?
    thanks a lot.
    /mishit

    can you post the file? or load the file into JDeveloper and check the syntax or use XMLSpy for validation of the XML.

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Accessing multiple xml elements with same name

    I am having trouble with an xsl stylesheet. This is what one of the rows of my output xml document looks like
            <Row>
                <Num>1</Num>
                <Valuation>Val</Valuation>
                <COMBCHARFLAG>Y</COMBCHARFLAG>
                <CCCOUNT>2</CCCOUNT>
                <CCDESC>CHARDESC1</CCDESC>
                <CCDESC>CHARDESC2</CCDESC>
            </Row>
    Does anyone know how I can access the 2nd CCDESC ("CHARDESC2") . When i run this in the workbench I can only ever access the first CCDESC, it acts like the 2nd isn't there. However I was also using a 3rd party xsl editor called "XMLSpy" to look for other possible solutions and when i render it with XMLSpy, everything is displaying correctly. Is this some sort of limitation of the workbench? Any help would be much appreciated. Thanks
    This is the template i am calling in my xsl.......
    <xsl:template name="for.loop">
    <xsl:param name="i" />
    <xsl:param name="count" />
    <!--begin_: Line_by_Line_Output -->
    <xsl:if test="$i &lt;= $count">
    <tr>
         <td align="center"><xsl:value-of select="CCDESC[position()=$i]"/>
         </td>
         <td align="center">
              <input style="width:110px;" class="Mfieldv-M" name="txtValuation"></input>
         </td>
    </tr>     
    </xsl:if>
    <!begin_: RepeatTheLoopUntilFinished>
    <xsl:if test="$i &lt;= $count">
    <xsl:call-template name="for.loop">
    <xsl:with-param name="i">
    <xsl:value-of select="$i + 1"/>
    </xsl:with-param>
    <xsl:with-param name="count">
    <xsl:value-of select="$count"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:if>
    I than call the template as follows from within my  <xsl:for-each select="Row"> statement
                                                                <xsl:call-template name="for.loop">
                                                                <xsl:with-param name="i">1</xsl:with-param>
                                                                <xsl:with-param name="count"><xsl:value-of select="CCCOUNT"/></xsl:with-param>
                                                                </xsl:call-template>

    Muzammil,
    Thanks for the response. I may have explained my situation a little poorly. I am not trying to access the 2nd CCDESC within the workbench via a repeater or such. It is after the XSL renders the page that I don't see the second CCDESC. When the XSL renders the page through Internet explorer i get something that looks like the following......
    Res # 1
    CHARDESC1 
    When I render it in the application XMLSpy it shows both CCDESC's like follows.
    Res # 1
    CHARDESC1 
    CHARDESC2
    In XMLSpy if i change the line of xsl code from      <td align="center"><xsl:value-of select="CCDESC[position()=$i]"/>  to       <td align="center"><xsl:value-of select="CCDESC[2]"/> the page is rendered in XMLSpy with both labels the same as follows.
    Res # 1
    CHARDESC2 
    CHARDESC2
    If i do that same change in the workbench and render the page through IE I get no label results....
    Res # 1
    Thanks

  • Generate XML with tag names generated dynamically.

    Hi Mark,
    I want to generate xml in the following way using SQLXoperators.
    But only problem is when i use the operator, the tag name should be supplied before in hand as parameter.
    So it works well when the data for the tags are stored in seperate columns then its pretty simple.
    But lets say the whole hierarchy of the nodes is stored in one table with ID-->PARENTID relationship and the text is stored in a column called description.
    Now using CONNECT BY PRIOR i get the hierarchy and now based on the description value i have to generate the tags and then fill in the other details.
    This is just a summary of what i want. the below sample has much more than that and actual data comes from more than one table.
    But if i get the solution for what i asked before i think i can build the test of the thing.
    <?xml version="1.0" encoding="UTF-8"?>
    <SequenceData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SequenceData.xsd">
         <Header>
              <TemplateName>Template(XML)</TemplateName>
              <TemplateVersion>1.1</TemplateVersion>
              <CreatedUser>rsh2kor</CreatedUser>
              <CreatedDate>17-06-2005 12.12.22</CreatedDate>
         </Header>
         <List>
              <LoadPoints>
                   <LoadPoint description="Loadpoint1_in_list(level one)">
                        <SetPhase>
                             <SetPhaseVariables>
                                  <SetPhaseVariable>
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>100</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                             </SetPhaseVariables>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <ID>12344<ID>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </SetPhase>
                        <WaitPhase>
                             <WaitingTime>10</WaitingTime>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </WaitPhase>
                        <MeasPhase>
                             <MeasPhaseVariables>
                                  <MeasPhaseVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Result>0</Result>
                                  </MeasPhaseVariable>
                             </MeasPhaseVariables>
                        </MeasPhase>
                   </LoadPoint>
              </LoadPoints>
         </List>
         <Loop Iteration="5">
              <LoadPoints>
                   <LoadPoint description="Loadpoint2_in_Loop">
                        <SetPhase>
                             <SetPhaseVariables>
                                  <SetPhaseVariable LoopCount="1">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>10</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="2">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>20</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="3">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>30</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="4">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>40</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="5">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>50</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                             </SetPhaseVariables>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </SetPhase>
                        <WaitPhase>
                             <WaitingTime>10</WaitingTime>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </WaitPhase>
                        <MeasPhase>
                             <MeasPhaseVariables>
                                  <MeasPhaseVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Result>0</Result>
                                  </MeasPhaseVariable>
                             </MeasPhaseVariables>
                        </MeasPhase>
                   </LoadPoint>
              </LoadPoints>
              <List>
                   <LoadPoints>
                        <LoadPoint description="Loadpoint3_in_list(level two)">
                             <MonitoredVariables/>
                             <SetPhase>
                                  <SetPhaseVariables>
                                       <SetPhaseVariable>
                                            <Name>pRail</Name>
                                            <Unit>bar</Unit>
                                            <Value>100</Value>
                                            <SettlingTime>0.0</SettlingTime>
                                       </SetPhaseVariable>
                                  </SetPhaseVariables>
                                  <MonitoredVariables>
                                       <MonitoredVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Limit>10</Limit>
                                            <Tolerance>0.0</Tolerance>
                                            <Operator>&gt;</Operator>
                                            <AlertType>STOP</AlertType>
                                       </MonitoredVariable>
                                  </MonitoredVariables>
                             </SetPhase>
                             <WaitPhase>
                                  <WaitingTime>10</WaitingTime>
                                  <MonitoredVariables>
                                       <MonitoredVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Limit>10</Limit>
                                            <Tolerance>0.0</Tolerance>
                                            <Operator>&gt;</Operator>
                                            <AlertType>STOP</AlertType>
                                       </MonitoredVariable>
                                  </MonitoredVariables>
                             </WaitPhase>
                             <MeasPhase>
                                  <MeasPhaseVariables>
                                       <MeasPhaseVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Result>0</Result>
                                       </MeasPhaseVariable>
                                  </MeasPhaseVariables>
                             </MeasPhase>
                        </LoadPoint>
                   </LoadPoints>
              </List>
         </Loop>
    </SequenceData>
    Pls help as soon as possible.
    Thanks.

    I'm not Mark, but check out this article it may be helpful.
    http://www.oracle.com/technology/oramag/oracle/05-may/o35asktom.html
    In 10g there are other SQL statements besides connect by prior for parent child relationships.
    such as:
    CONNECT_BY_ROOT—returns the root of the hierarchy for the current row; this greatly simplifies our query. (See below for an example).
    CONNECT_BY_ISLEAF—is a flag to tell you if the current row has child rows.
    CONNECT_BY_ISCYCLE—is a flag to tell you if the current row is the beginning of an infinite loop in your hierarchy. For example, if A is the parent of B, B is the parent of C, and C is the parent of A, you would have an infinite loop. You can use this flag to see which row or rows are the beginning of an infinite loop in your data.
    NOCYCLE—lets the CONNECT BY query recognize that an infinite loop is occurring and stop without error (instead of returning a CONNECT BY loop error).

  • How to get the second element in XML Response with same name

    Hi All,
    I am struck at this point, I have written a sample HTTP client which sends a request to the HTTP Server. In response to the request made the HTTP Server gives response in the XML format. eg: -
    <?xml version="1.0"?>
    <parent>
    <node1> Value1 </node1>
    <node1> Value2 </node1>
    <node2> Value3 </node2>
    </parent>
    In the HTTP Client I am getting the value of node1 using the following statement: -
    if (node instanceof Element && "node1".equals(((Element)node).getName()) )
    String node1 = node.getStringValue();
    System.out.println("Product Code:"+node1);
    This is always returning the first node1 value i.e. <node1> Value1 </node1>.
    The requirement is, I also need to get the <node1> Value2 </node1> value also. So can anyone tell me hw can I get the <node1> Value2 </node1> value. please tell me the piece of code that I should add to get the <node1> Value2 </node1>.
    My Mode is something like this: -
    try
                   Document document = (Document)DocumentHelper.parseText(response);
                   List<Node> transactionNodeList = document.selectNodes( "//parent" );
                   for(Node singleNode:transactionNodeList)
                        for(int i=0,j=0;i< ((Element)singleNode).nodeCount();i++ )
                             Node node = ((Element)singleNode).node(i);
                             if (node instanceof Element && "node1".equals(((Element)node).getName()) )
    node1= node.getStringValue();
    System.out.println("Air Way Bill Number:"+node1);
    if (node instanceof Element && "node1".equals(((Element)node).getName()) )
    node1= node.getStringValue();
    System.out.println("Product Code:"+node1);
    Thanks in Advance

    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder db=factory.newDocumentBuilder();
         Document doc=db.parse(new File(ur xml file"));
         Element root=doc.getDocumentElement();
         System.out.println("root "+root.getNodeName());

  • Unmarshal SOAP response, as raw XML String with JAXB

    Hi,
    I have a soap response, as raw xml (a java.lang.String), and I want to unmarshal it's content into the classes generated by wsimport.
    This must be a simple task but I couldn't find a way to do it.
    Can someone tell me how I can achieve this ?
    Edited by: Raphael_Lemaire on May 25, 2010 8:30 AM

    Raphael_Lemaire wrote:
    Yes it works this way.
    I kind of hoped that i could use a jax-ws api to shorten the code.well, how exactly do you get that string full of xml? (as a side note, you need to be careful turning xml into strings, the data can easily broken if you don't translate the bytes into characters correctly). if you use the jaxws api to make soap calls, then you don't really need to deal with the xml at all.
    Edited by: jtahlborn on May 26, 2010 7:38 AM

  • How to extract a clob xml string with multiple row of table tag. in 10g

    i have a xml value like:
    <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
    i want to insert each of <c> value in a table with respective columns according c1,c2,c3,c4
    pls suggest me what to do
    I use extract(xml, '/table) tab but it just read first one line & return error for other

    Can you plz explain to me thisIt is because you did not provide us with a valid xml structure so I used 11g's xmlparse function to create a xmltype even with the xml not being valid (no root tag).
    With a valid xml structure I could use the xmltype constructor instead and go on the same way as before:
    SQL> select *
      from xmltable (
             'table'
             passing xmltype ('
                            <root>
                            <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
                            </root>').extract ('root/table')
             columns c1 number path 'c1', c2 varchar2 (4) path 'c2', c3 varchar2 (6) path 'c3', c4 varchar2 (6) path 'c4')
            C1 C2     C3        C4      
             0 Mr     abc       Sharma  
             0 Mrs    abcd      Sharma  
             0 Mr     sabc      Sharma  
             0 Mrs    sdabc     Sharma  
             0 Mr     dabc      Sharma  
             0 Mr     adbc      Sharma  
    6 rows selected.

  • How to handle XML string with Single Quotes as a parameter to SP dynamically?

    Hi,
    I would like to know if there is a way to handle the Single Quotes in XML value when it is passed to Stored Procedure?
    I should be able to handle it without adding another Single Quote to it.
    Thanks,
    Chandra Shekar

    Hi Chandra,
    Your requirement is not precise. Based on my understanding and guessing, are you metioning something like the below sample?
    /*If the xml is generated you have no need to escape the singe quote(')*/
    DECLARE @xmlTbl TABLE (ID INT,name VARCHAR(99));
    INSERT INTO @xmlTbl VALUES(1,'Eric''s')
    INSERT INTO @xmlTbl VALUES(2,'Zhang''s')
    DECLARE @xmlDoc1 XML
    SELECT @xmlDoc1
    FROM @xmlTbl FOR XML PATH('PERSON'),ROOT('PERSONS')
    EXEC yourProcedure @xmlDoc1
    /*If your copy and paste the xml, you have to escape the single quote(') with 2s('')*/
    DECLARE @xmlDoc2 XML
    SET @xmlDoc2 = '<PERSONS>
    <PERSON>
    <ID>1</ID>
    <name>Eric''s</name>
    </PERSON>
    <PERSON>
    <ID>2</ID>
    <name>Zhang''s</name>
    </PERSON>
    </PERSONS>'
    EXEC yourProcedure @xmlDoc2
    If that is not regarding your requirement, please elaborate with more details.
    Eric Zhang
    TechNet Community Support

  • Sent 7 files to the trash and they never complete the task.  A screen with the names of each file comes up with the running bar symbol.  Then click the little x in each corner of the file name to stop it.  Tried ESC and tried shut down but no result.

    How do I get the 7 files that are going to the trash and then canceled to complete one way or another. 

    This has nothing to do with the TB display.  You should repost in the computer forum

  • Webservice response (XML response) with tag not mandatory

    Hello all,
    I have a problem with a webservice response.
    I implemented a wsdl who created some method to call webservices (Methox X, Y ,Z).
    I call the method 'X' with a table of string who have3 values in input, and I have in a  XML Answer of the webservice call that :
    <tag1> Value 1.1
    <tag2> Value 1.2
    <tag3> Value 1.3
    <message>OK
    <tag3> Value 2.3
    <message>KO
    <tag1> Value 3.1
    <tag2> Value 3.2
    <tag3> Value 3.3
    <message>OK
    Tags 1, 2 and 3 are not mandatory in wsdl (Min occurs = 0).
    In output of the method 'X' (created by wsdl implemantation) a ABAP structure with that :
    ValueTag1 | ValueTag2 | ValueTag3 | message
    Value 1.1 | Value 1.2 | Value 1.3 | OK
    Value 3.1 | Value 3.2 | Value 2.3 | KO
    No value. | No value. | Value 3.3 | OK
    I expect to have logically:
    ValueTag1 | ValueTag2 | ValueTag3 | message
    Value 1.1 | Value 1.2 | Value 1.3 | OK
    No value. | No value. | Value 2.3 | KO
    Value 3.1 | Value 3.2 | Value 3.3 | OK
    SAP put into the line 2of the structure, data of 3rd response because it dont found tag in the 2nd response.
    If i do my call, value by value and i concatenate anwsers, i have no problem.
    I dont understand the error and i cant find SAP note on the subject.
    Someone know ths problem ?
    Thanks.

    Hello,
    I have a wsdl file who describe webmethod and his parameters.
    I implemented this wsdl into a client proxy.
    SAP create automatically some CLASS, METHOD, STRUTURE.
    I call one of this method to ask the webservice.
    A XML flow sent and the webservice respond to me with a other XML flow.
    The XML flow response his automatically transforme by SAP, and i receive it into a structure in output of my method.
    Example :
    CREATE OBJECT XXX
      EXPORTING
        logical_port_name = `ZZZZ`.
    CATCH cx_ai_system_fault INTO fault.
      RAISE EXCEPTION fault.
    IF XXX IS BOUND.
      TRY.
        XXX->METHODYYY(
                EXPORTING
                   input =  ii_input
                IMPORTING
                   output = oo_output ).
       CATCH cx_ai_system_fault INTO fault1.
         RAISE EXCEPTION lr_fault1 .
       CATCH Error_ws INTO fault2.
         RAISE EXCEPTION lr_fault2.
       CATCH cx_ai_application_fault INTO fault3.
         RAISE EXCEPTION lr_fault3.
       CLEANUP.
      ENDTRY.
    ENDIF.
    METHODYYY was created by SAP with wsdl file.
    ii_input and oo_output and typed like structure in wsdl file.
    I can see XML flow and his content in SOAMANAGER transaction when i activate full trace.

  • Applescript: prepend a string with folder name

    I’ve found this script that copies the names of multiple selected files in the Finder to clipboard:
    try
         set theNames to {}
         tell application "Finder"
              repeat with i in (get selection)
                   set end of theNames to name of i
              end repeat
           end tell
         set {TID, text item delimiters} to {text item delimiters, return}
         set the clipboard to theNames as text
         set text item delimiters to TID
    end try
    I need to prepend to each result a string like "www.domain-name.ext/folder", where “folder” is the parent folder relative to the files.
    How can I do it? Thanks in advance.

    You can do something like:
    try
       set theNames to {}
       tell application "Finder"
          repeat with i in (get selection)
              set parentName to name of container of i
              set end of theNames to "www.domain-name.ext/" & parentName & "/" & name of i
          end repeat
        end tell
        if theNames is not {} then
          set {TID, text item delimiters} to {text item delimiters, return}
          set the clipboard to theNames as text
          set text item delimiters to TID
        end if
    on error errmess
        log errmess
    end try

  • Append XML elements with same name in an XML document

    Hi,
    I am using Oracle9i XMLDB utilities to modify an XML document stored in the database. I have a sample XML document like this in the database:
    <Person>
    <Address ID="1"> </Address>
    </Person>
    My task is to include a second <Address> element with a different attribute so that my XML document will become
    <Person>
    <Address ID="1"> </Address>
    <Address ID="2"> </Address>
    </Person>
    After creating the second element, I am using the function xmldom.appendChild() or xmldom.insertBefore() but they remove the first <Address> element and replace it with the second one. This is not what I want since I want both <Address> elements to be present.
    Could anyone please advise.
    Thanks.
    A. Dennis

    Please post your question [url http://forums.oracle.com/forums/forum.jsp?forum=154]here for quick response.
    thank you.
    Regards,
    Anupama
    [url http://otn.oracle.com/sample_code/]OTN Sample Code

Maybe you are looking for

  • Video camera doesn't work after installing IOS 7

    I can't use video camera with iPad 2 after upgrading to IOS 7. Anyone knows why?

  • Media encoder cs 6 and cuda  Ge Force gtx 780

    HI I have a new graphics card   it is the Gigabyte GeForce 780 I have CC and CC 2014  and also CS6    I notice that if encode using AME I can see Cuda enabled in the encoder window and the option to use software only as well. I don't see that option

  • How can i make the radiobutton use screen painter?

    hey experts, i paint 3 radiobuttons in group1 use screen painter, but when i execute the screen,all of the radiobutton are black, it means radio1='x',radio2 = 'x',radio3 = 'x'. i only want radio1 = 'x',radio2 = ' ', radio3 = ' '. how to do that? and

  • Working of a cellphone

    Hi all I'd like to get some information abt how exactly a cellphone works - basically what happens when a call is made and when we reject the call, how does the message of rejection travel across?Are there any good links which could explain this info

  • Tool versions and Application versions

    hi, i have a doubt in basic concept of peopleosft regarding the realtion between tool versions and application versions I have two systems.. system1 : Application version 8.8 and tool version 8.49 system 2: Application version 8.9 and tool version 8.