How To Remove Empty Node From Source XML

Hi,
How can I remove an empty node from the source xml in a XSLT mapping.
For e.g. If the source xml is like:
<SRC>
<Node1>SAP</Node2>
<Node2/>
<Node3>XI</Node3>
</SRC>
Then the xml should become:
<SRC>
<Node1>SAP</Node2>
<Node3>XI</Node3>
</SRC>
I need to do this because the output of my XSLT mapping is showing blank spaces for each blank node.
Thanks,
Abhishek.

Use <xsl:if>
Or else you may find different options here
http://www.dpawson.co.uk/xsl/sect2/N3328.html#d4804e304
Regards,
Prateek

Similar Messages

  • How to remove a node from a xml

    Hi All,
    I want to remove a node from my xml output. Can anyone suggest me how to get that? I want to implement this by using the ASSIGN activity.
    My sample output is
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
         <env:Header>
              <wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
              <wsa:ReplyTo>
                   <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
              </wsa:ReplyTo>
         </env:Header>
         <env:Body>
              <SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
                   <ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
                        <Orders>
                             <Id>1-15IXJ</Id>
                             <AccountId>1-2EE</AccountId>
                             <OrderNumber>1012-1234</OrderNumber>
                             <ListOfLineItems>
                                  <LineItems>
                                       <Id>1-15IYN</Id>
                                       <LineNumber>303</LineNumber>
                                       <OrderNumber>1012-1234</OrderNumber>
                                       <OrderHeaderId>1-15IXJ</OrderHeaderId>
                             </LineItems>
                                  </ListOfLineItems>
                             </Orders>
    </ListOfOrderInterface>
              </SiebelOrderQueryByExample_Output>
         </env:Body>
    </env:Envelope>
    I want to delete the <ListOfLineItems>node from the xml above so that my resultant would be,
         <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
         <env:Header>
              <wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
              <wsa:ReplyTo>
                   <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
              </wsa:ReplyTo>
         </env:Header>
         <env:Body>
              <SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
                   <ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
                        <Orders>
                             <Id>1-15IXJ</Id>
                             <AccountId>1-2EE</AccountId>
                             <OrderNumber>1012-1234</OrderNumber>
         </Orders>
    </ListOfOrderInterface>
              </SiebelOrderQueryByExample_Output>
         </env:Body>
    </env:Envelope>     
    Please suggest something Its urgent.
    Thanks in Advance.

    It goes something like this, taken from the above blog entry:
    Removing a node from node-list
    With the bpelx: extensions in BPEL you are able to insert and update nodes in a node list. A node-list is an XML message that contains a set of records. In this article I use the following example:
    <BookList xmlns="http://message.vijfhuizen.com">
    <Book>
    <title>The Lord Of The Rings</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>Harry Potter</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>The Hobbit</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>Storm; Chronicals of Pandarve</title>
    <author>Don Lawrence</author>
    </Book>
    </BookList>
    For creating and updating node lists the bpelx: functions are enough to handle this. But when you want to remove a particular node, you can use the bpelx:remove function. But this function can only remove a node from a particular position. For example removing the second node you code:
    <bpel:assign>
    <bpelx:remove>
    <bpelx:target variable="VarBookList" query="/Booklist/Book[2]" />
    </bpelx:append>
    </bpel:assign>
    It is hard to code the bpelx:remove to create a xpath to dynamicly remove node. You would like to remove the second node based on the xpath:
    /Booklist/Book[title="Harry Potter" and author="J.R.R. Tolkien"]
    You can add the above xpath in the bpelx:remove, but you are not able to make this dynamically.
    There is a solution. The trick is to create a stylesheet that copies the data into a new message, but removing that particular records. Create a stylesheet that does the normal copy of the XML message. Then add a <choose> element in the stylsheet to filter that particular record.
    <xsl:template match="/">
    <BookList>
    <xsl:for-each select="/BookList/Book">
    <xsl:choose>
    <xsl:when test="title='Harry Potter' and author='J.R.R. Tolkien'"/>
    <xsl:otherwise>
    <Book>
    <title>
    <xsl:value-of select="title"/>
    </title>
    <author>
    <xsl:value-of select="author"/>
    </author>
    </Book>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:for-each>
    </BookList>
    Now we have a XSL stylesheet that removes a particular record, but this is not variable. This can be done via XSLT parameters.
    <xsl:param name="pTitle"/>
    <xsl:param name="pAuthor"/>
    <xsl:template match="/">
    <BookList>
    <xsl:for-each select="/BookList/Book">
    <xsl:choose>
    <xsl:when test="title=$pTitle and author=$pAuthor"/>
    <xsl:otherwise>
    <Book>
    <title>
    <xsl:value-of select="title"/>
    </title>
    <author>
    <xsl:value-of select="author"/>
    </author>
    </Book>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:for-each>
    </BookList>
    </xsl:template>
    Now we are able to use this stylesheet in BPEL. In general BPEL create the following code:
    <assign name="Transform">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('RemoveNode.xsl'
    , bpws:getVariableData('Variable_BookList','payload')" />
    <to variable="Variable_BookListTemp" part="payload"/>
    </copy>
    </assign>
    But this code does not pass parameters to the stylesheet. The ora:processXSLT() can do this it has an additional parameter in this function:
    <assign name="Transform">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('RemoveNode.xsl'
    , bpws:getVariableData('Variable_BookList','payload')" />
    , bpws:getVariableData('BPELxslparameters'))"/>
    <to variable="Variable_BookListTemp" part="payload"/>
    </copy>
    </assign>
    Now only you have to create the BPELxslparameters variable and assign it with the correct name/value pairs. The structure of the this variable is as follows:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/service/bpel/common"
    targetNamespace="http://schemas.oracle.com/service/bpel/common"
    elementFormDefault="qualified">
    <xsd:element name="parameters">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="value" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Create in BPEL the variable BPELxslparameters and let it point to this strucure:
    <process ....
    xmlns:common="http://schemas.oracle.com/service/bpel/common"
    .../>
    <variable name="BPELparameters" element="common:parameters"/>
    Now we can in BPEL create an empty XML message, based on this strcuture and assign the values to these parameters and then call the processXSLT function.
    <bpelx:assign name="Assign_GenerateEmptyParameterSet">
    <copy>
    <from>
    <parameters xmlns="http://schemas.oracle.com/service/bpel/common">
    <item>
    <name>pTitle</name>
    <value/>
    </item>
    <item>
    <name>pAutor</name>
    <value/>
    </item>
    </parameters>
    </from>
    <to variable="BPELparameters" query="/common:parameters"/>
    </copy>
    </bpelx:assign>
    <assign name="Assign_setXSLTParameters">
    <copy>
    <from expression="'Harry Potter'"/>
    <to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
    </copy>
    <copy>
    <from expression="'J.R.R. Tolkien'"/>
    <to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
    </copy>
    </assign>
    Posted by Marc Kelderman SOA Blog at 1/16/2008 09:20:00 PM

  • Mapping question - how to remove empty recordsets from output XML?

    Hello everyone!
    I have a mapping problem I hope you can help me out with.
    Here is an example of the source message:
    <IDOC>
    .    <HEAD>
    .    </HEAD>
    .    <DET>
    .    .    <Node>
    .    .    .    <nodeA>001</nodeA>
    .    .    .    <nodeB>OA</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeB>OB</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeA>002</nodeA>
    .    .    .    <nodeB>OC</nodeB>
    .    .    </Node>
    .    </DET>
    </IDOC>
    After testing the above XML in the message mapping, here's what my target looks like:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nB>
    .    .    .    <nA>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    "Node" in the "source" message is mapped to "Rec" in my "target" message.
    "Node=" -
    > "Rec"
    You may notice the the "Rec" in the second entry has empty fields. The reason this is so is because I put an "IF" condition in field "nA" and field "nB" that checks whether "nodeA" in the "source" exists/has a value, and if it doesn't, empty values should be given.
    Here's my problem, I need the XML output to be clean. All empty Recs should be removed from the Output XML so that it resembles the one below:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    I've tried several ways to get this done to no avail. Would anyone be able to help me out? I would really, really appreciate it!
    Warm regards,
    Glenn

    Hello,
    Here's how the Display Queue looks like from the "CreateIF"
    Default Context:
    0     [false]     [suppress]
    1     [false]     [suppress]
    2     [false]     [suppress]
    3     [true]     []
    4     [false]     [suppress]
    5     [true]     []
    6     [false]     [suppress]
    7     [false]     [suppress]
    8     [false]     [suppress]
    9     [true]     []
    10     [false]     [suppress]
    11     [false]     [suppress]
    12     [false]     [suppress]
    13     [true]     []
    14     [false]     [suppress]
    15     [false]     [suppress]
    16     [false]     [suppress]
    17     [true]     []
    18     [false]     [suppress]
    19     [false]     [suppress]
    20     [false]     [suppress]
    21     [true]     []
    CreateIF Context up one notch:
    0     [false]     [suppress]
    1     [true]     []
    2     [true]     []
    3     [true]     []
    4     [true]     []
    5     [true]     []
    6      [true]     []     
    7     [true]     []
    8     [false]     [suppress]
    9     [false]     [suppress]
    10     [false]     [suppress]
    11     [false]     [suppress]
    Here's how the Display Queue looks like from the "NodeA"
    SUPPRESS     [false]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [true]
    [0000000252]     [false]
    [0000000252]     [true]
    SUPPRESS     [false]
    [0000000078]     [false]
    [0000000078]     [false]
    SUPPRESS     [true]
    [0000000109]     [false]
    [0000000109]     [false]
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000292]     [false]
    SUPPRESS     [false]
    [0000000076]     [false]
    [0000000076]     [true]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [false]
    SUPPRESS     [true]
    SUPPRESS     [false]
    NodeA context one notch up:
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000078]     [true]
    [0000000109]     [true]
    [0000000292]     [true]
    [0000000076]     [true]
    [0000000292]     [true]
    [0000000074]     [true]
    [0000000077]     [true]
    [0000000081]     [true]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000081]     [true]
    [0000000081]     [false]
    SUPPRESS
    Hope that helps you help me!
    Glenn

  • How to remove target node if source field value is empty SAP PI Mapping

    Hello,
    how to remove target node if source field value is empty in graphical Mapping.
    Like if
    MIddle name in source filed is empty, I would like to eliminate target field from out put XML.
    Thank you
    John

    Hi Jhon,
    If you want to remove all empty tags and you dont to complicate your message mapping, you can use a XSL, after the message mapping,  to remove all the empty tags:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="*[not(@*|*|comment()|processing-instruction())
         and normalize-space()='' ]"/>
    </xsl:stylesheet>
    Regards

  • How to remove a node from nlb at runtime?

    hello,
    i need to temporally exclude a node from an nlb.
    May happen that a server is up and working but the web application i'm balancing is out of sinch with the same application in the others nodes.
    Eg. some static variables are not the same of the same static variables of other nodes, because of a timeout, a write error and so on but the server is still working.
    in this case i need to stop the server from nlb because the information in the web application is not in sinch with other nodes.
    I need to prevent users from being serverd from this out to date server, untill it will became updated, but i need to do this programmatically
    how can i do it?

    "DuoMi" <[email protected]> wrote in message
    news:gnojbf$2sg$[email protected]..
    > How to remove a node from XMLList
    >
    > I want remove the first node from XMLList
    >
    >
    > and how to get the combobox all values string:
    >
    > <data>
    > <value>2</value>
    > </date>
    > <data>
    > <value>5</value>
    > </date>
    > <data>
    > <value>8</value>
    > </date>
    >
    > I need a string whit value "2,5,8"
    >
    > thkan you.~
    I think something like
    comboBox.dataProvider..value.toString()
    will work.

  • How to remove a node from XMLList

    How to remove a node from XMLList
    I want remove the first node from XMLList
    and how to get the combobox all values string:
    <data>
    <value>2</value>
    </date>
    <data>
    <value>5</value>
    </date>
    <data>
    <value>8</value>
    </date>
    I need a string whit value "2,5,8"
    thkan you.~

    "DuoMi" <[email protected]> wrote in message
    news:gnojbf$2sg$[email protected]..
    > How to remove a node from XMLList
    >
    > I want remove the first node from XMLList
    >
    >
    > and how to get the combobox all values string:
    >
    > <data>
    > <value>2</value>
    > </date>
    > <data>
    > <value>5</value>
    > </date>
    > <data>
    > <value>8</value>
    > </date>
    >
    > I need a string whit value "2,5,8"
    >
    > thkan you.~
    I think something like
    comboBox.dataProvider..value.toString()
    will work.

  • How to remove empty lines from xml files after removing nodes from document

    <pre>
    Hi
    <b>i have xml document, which is shown below
    after removing some nodes from the document ,i am getting empty lines in place of removed nodes,how to resolve this and get the proper xml document without any errors</b>
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE Message SYSTEM "TRD01.dtd">
    <Message>
    <Header>
    <CounterPartyType>CLIENT</CounterPartyType>
    <CreationTime>20134455</CreationTime>
    <ErrorCode>363 </ErrorCode>
    <ErrorEnterPriseId>N</ErrorEnterPriseId>
    <ErrorStatus>1</ErrorStatus>
    <ErrorSystemId>STL</ErrorSystemId>
    <ErrorTimes>31</ErrorTimes>
    <MessageType>T</MessageType>
    <RecipientEnterpriseId>N</RecipientEnterpriseId>
    <RecipentSystemId>EXM</RecipentSystemId>
    <Remarks>REMARSK</Remarks>
    <SenderEnterpriseId>N</SenderEnterpriseId>
    <SenderSystemId>TR</SenderSystemId>
    </Header>
    </Message>
    <ErrorCode>363 </ErrorCode>
    <ErrorEnterPriseId>NIHK</ErrorEnterPriseId>
    <ErrorStatus>1</ErrorStatus>
    <ErrorSystemId>STL</ErrorSystemId>
    <ErrorTimes>31</ErrorTimes>
    XPathExpression expression5 = xpath.compile(xmlpath5);
    Object result5 = expression5.evaluate(doc, XPathConstants.NODE);
    Node node5 = (Node) result5;
    node5.getParentNode().removeChild(node5);
    XPathExpression expression6 = xpath.compile(xmlpath6);
    Object result6 = expression6.evaluate(doc, XPathConstants.NODE);
    Node node6=(Node) result6;
    node6.getParentNode().removeChild(node6);
    XPathExpression expression7 = xpath.compile(xmlpath7);
    Object result7 = expression7.evaluate(doc, XPathConstants.NODE);
    Node node7=(Node) result7;
    node7.getParentNode().removeChild(node7);
    doc.normalize();
    doc.normalizeDocument();
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    t.setOutputProperty(OutputKeys.INDENT, "yes");
    t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    t.setOutputProperty(OutputKeys.METHOD,"xml");
    t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    the xml output i am getting is
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Message>
    <Header>
    <CounterPartyType>CLIENT</CounterPartyType>
    <CreationTime>20134455</CreationTime>
    <MessageType>TRD01</MessageType>
    <RecipientEnterpriseId>N</RecipientEnterpriseId>
    <RecipentSystemId>STL</RecipentSystemId>
    <Remarks>REMARSK</Remarks>
    <SenderEnterpriseId>N</SenderEnterpriseId>
    <SenderSystemId>T</SenderSystemId>
    </Header>
    </Message>
    <b>could you please let me know how to avoid empty lines in the xml doucment output</b>
    this is the method i am using to get the result
    public void ValidateRecord(String xml){
    try{
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = factory.newDocumentBuilder();
    //parse file into DOM
    /*DOMParser parser = new DOMParser();
    parser.setErrorStream(System.err);
    parser.setValidationMode(DTD_validation);
    parser.showWarnings(true);*/
    System.out.println ("HI THIS xml is validation "+xml);
    Resolver res = new Resolver();
    db.setEntityResolver(res);
    Document doc = db.parse(new InputSource(new StringReader(xml)));
    XPathFactory xpf = XPathFactory.newInstance();
    XPath xpath = xpf.newXPath();
    // XPathExpression expression = xpath.compile("//A/B[C/E/text()=13]");
    String xmlpath="/Message/Header/CounterPartyType/text()";
    String xmlpath1="/Message/Header/RecipentSystemId/text()";
    String xmlpath2="/Message/Header/ErrorSystemId/text()";
    XPathExpression expression = xpath.compile(xmlpath);
    XPathExpression expression1 = xpath.compile(xmlpath2);
    Object result = expression.evaluate(doc, XPathConstants.NODE);
    Object result1 = expression1.evaluate(doc, XPathConstants.NODE);
    Node node = (Node) result;
    Node node1 = (Node) result1;
    System.out.println("the values of the string is " +node.getNodeValue());
    System.out.println("the values of the string is " +node1.getNodeValue());
    // for (int i = 0; i < nodes.getLength(); i++) {
    //System.out.println(nodes.item(i).getNodeValue());
    // CAHNGING THE RECEIPENT NODE
    XPathExpression expression2 = xpath.compile(xmlpath1);
    Object result2 = expression2.evaluate(doc, XPathConstants.NODE);
    Node node2 = (Node) result2;
    System.out.println(node2);
    node2.setNodeValue(node1.getNodeValue());
    System.out.println(node2);
    //removing the nodes from document
    String xmlpath3="/Message/Header/ErrorCode";
    String xmlpath4="/Message/Header/ErrorEnterPriseId";
    String xmlpath5="/Message/Header/ErrorStatus";
    String xmlpath6="/Message/Header/ErrorSystemId";
    String xmlpath7="/Message/Header/ErrorTimes";
    XPathExpression expression3 = xpath.compile(xmlpath3);
    Object result3 = expression3.evaluate(doc, XPathConstants.NODE);
    Node node3 = (Node) result3;
    node3.getParentNode().removeChild(node3);
    XPathExpression expression4 = xpath.compile(xmlpath4);
    Object result4 = expression4.evaluate(doc, XPathConstants.NODE);
    Node node4 = (Node) result4;
    System.out.println("node value");
    System.out.println(node4.getParentNode().getNodeName());
    node4.getParentNode().removeChild(node4);
    XPathExpression expression5 = xpath.compile(xmlpath5);
    Object result5 = expression5.evaluate(doc, XPathConstants.NODE);
    Node node5 = (Node) result5;
    node5.getParentNode().removeChild(node5);
    XPathExpression expression6 = xpath.compile(xmlpath6);
    Object result6 = expression6.evaluate(doc, XPathConstants.NODE);
    Node node6=(Node) result6;
    node6.getParentNode().removeChild(node6);
    XPathExpression expression7 = xpath.compile(xmlpath7);
    Object result7 = expression7.evaluate(doc, XPathConstants.NODE);
    Node node7=(Node) result7;
    node7.getParentNode().removeChild(node7);
    // Node b13Node = (Node) expression.evaluate(doc, XPathConstants.NODE);
    //b13Node.getParentNode().removeChild(b13Node);
    doc.normalize();
    doc.normalizeDocument();
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    t.setOutputProperty(OutputKeys.INDENT, "yes");
    t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    t.setOutputProperty(OutputKeys.METHOD,"xml");
    t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    t.transform(new DOMSource(doc), new StreamResult(System.out));
    catch (Exception e) {
         e.printStackTrace();
    System.out.println(e.getMessage());
    </pre>
    Edited by: user12185243 on Apr 6, 2013 6:38 AM
    Edited by: user12185243 on Apr 6, 2013 6:41 AM
    Edited by: user12185243 on Apr 6, 2013 6:43 AM
    Edited by: user12185243 on Apr 6, 2013 6:45 AM
    Edited by: user12185243 on Apr 6, 2013 9:00 AM

    either this way we can do this
    1)
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    <b> factory.setIgnoringElementContentWhitespace(true); </b>
    DocumentBuilder db = factory.newDocumentBuilder();
    or
    2)
    java.io.StringWriter sw = new java.io.StringWriter();
    StreamResult sr = new StreamResult(sw);
    t.transform(new DOMSource(doc), sr);
    String xml1 = sw.toString().trim();
    <b> xml1=xml1.replaceAll("\\s",""); </b>
    System.out.println(xml1.trim());

  • How to remove a node from a target xml payload in reciever file channel

    i have a scenario where i have to remove a node from my target xml file in receiver file channel and want xml as the output file. I don't want a fixed length file. How to do that in receiver channel? Do we need to use file content conversion for that?

    that will result in giving you a fixed file or a separator defined file.
    it will not give you an XML file.
    In case you want a XML file, instead of using variable substitution, use Dynamic configuration and adapter specific properties.
    Some ref:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

  • How to remove a node from 4 node sun cluster 3.1

    Dear All,
    We are having a four nodes in a cluster.
    Could any one please guide me, how to remove a single node from a 4 node cluster.
    what are the procedure and step's I have to follow.
    Thanks in advance.
    Veera.

    Google is pretty good at finding the right pages in our docs quickly. I tried >how to remove a node Solaris Cluster< and it came up with
    http://docs.sun.com/app/docs/doc/819-2971/gcfso?a=view
    Tim
    ---

  • Unable to remove empty nodes from Message

    Hello,
    I have message format like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:Enrollment xmlns:ns1="http://pac.bluecross.ca/Common/Types" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance">
      <ns1:Policies>
      <ns1:Policy>
      <ns1:Code>11140</ns1:Code>
      <ns1:Certificates>
      <ns1:Certificate>
      <ns1:Class>
      <ns1:Code>1</ns1:Code>
      <ns1:EffectiveDate>2009-05-09T00:00:00</ns1:EffectiveDate>
      </ns1:Class>
      <ns1:CurrentEmploymentRecord>
      <ns1:HoursWorked>20</ns1:HoursWorked>
      <ns1:Type>FullTimeHourly</ns1:Type>
      </ns1:CurrentEmploymentRecord>
      <ns1:CurrentIncome>
      <ns1:Amount>5000</ns1:Amount>
      <ns1:EffectiveDate>2014-01-01T00:00:00</ns1:EffectiveDate>
      <ns1:Frequency>BiWeekly</ns1:Frequency>
      <ns1:Type>Salary</ns1:Type>
      </ns1:CurrentIncome>
      <ns1:Dependents>
      <ns1:CoveredLife>
      <ns1:CoverageDeclines/>
      <ns1:CoveredLifeHolder>
      <ns1:Contacts/>
      <ns1:DefaultAddress/>
      <ns1:DefaultEmail/>
      <ns1:DefaultPhone/>
      <ns1:PreferredLanguage>ENG</ns1:PreferredLanguage>
      <ns1:DateOfBirth>2009-05-09T00:00:00</ns1:DateOfBirth>
      <ns1:FirstName>Sean Louis</ns1:FirstName>
      <ns1:LastName>Carrier</ns1:LastName>
      <ns1:***>Male</ns1:***>
      </ns1:CoveredLifeHolder>
      <ns1:DependentCategory>Child</ns1:DependentCategory>
      <ns1:DependentSubCategory>Minor</ns1:DependentSubCategory>
      <ns1:Number>03</ns1:Number>
      </ns1:CoveredLife>
      </ns1:Dependents>
      <ns1:Division>
      <ns1:Code>1</ns1:Code>
      <ns1:EffectiveDate>2009-05-09T00:00:00</ns1:EffectiveDate>
      </ns1:Division>
      <ns1:FamilyCategory>Family</ns1:FamilyCategory>
      <ns1:HealthCareSpendingAccountInformation/>
      <ns1:HireDate>2002-07-15T00:00:00</ns1:HireDate>
      <ns1:InsuredCoveredLife>
      <ns1:CoverageDeclines/>
      <ns1:CoveredLifeHolder>
      <ns1:Contacts/>
      <ns1:DefaultAddress ns2:type="ns1:CanadianAddress">
      <ns1:City>Surrey</ns1:City>
      <ns1:Country>CA</ns1:Country>
      <ns1:Line1>98 - 10752 Guildford Drive</ns1:Line1>
      <ns1:PostalCode>V3R 1W6</ns1:PostalCode>
      <ns1:Province>BC</ns1:Province>
      </ns1:DefaultAddress>
      <ns1:DefaultEmail>
      <ns1:CorrespondenceMethod>Email</ns1:CorrespondenceMethod>
      <ns1:CorrespondenceType>Home</ns1:CorrespondenceType>
      <ns1:Data>[email protected]</ns1:Data>
      </ns1:DefaultEmail>
      <ns1:DefaultPhone>
      <ns1:CorrespondenceMethod>Telephone</ns1:CorrespondenceMethod>
      <ns1:CorrespondenceType>Home</ns1:CorrespondenceType>
      <ns1:Data>(001)(555)555-5555</ns1:Data>
      </ns1:DefaultPhone>
      <ns1:PreferredContact>Mail</ns1:PreferredContact>
      <ns1:PreferredLanguage>ENG</ns1:PreferredLanguage>
      <ns1:DateOfBirth>1974-02-07T00:00:00</ns1:DateOfBirth>
      <ns1:FirstName>Krisztina</ns1:FirstName>
      <ns1:LastName>Carrier</ns1:LastName>
      <ns1:***>Female</ns1:***>
      </ns1:CoveredLifeHolder>
      <ns1:EffectiveDate>2007-06-01T00:00:00</ns1:EffectiveDate>
      <ns1:Status>Inforce</ns1:Status>
      </ns1:InsuredCoveredLife>
      <ns1:JobTitle>Recreation Leader 2</ns1:JobTitle>
      <ns1:Number>000050</ns1:Number>
      <ns1:Plan>
      <ns1:Code>9027380101</ns1:Code>
      <ns1:EffectiveDate>2009-05-09T00:00:00</ns1:EffectiveDate>
      </ns1:Plan>
      <ns1:RegionalAdministration>
      <ns1:Country>CA</ns1:Country>
      <ns1:ProvinceOfBilling>BC</ns1:ProvinceOfBilling>
      </ns1:RegionalAdministration>
      <ns1:Section/>
      </ns1:Certificate>
      </ns1:Certificates>
      </ns1:Policy>
    Here is my XSL for removing empty nodes:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:strip-space elements="*"/>
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="*[not(@*) and not(*) and (not(text()) or .=-1)]"/>
    </xsl:stylesheet>
    This program removes all empty nodes except below nodes:
    <ns1:Dependents>
      <ns1:CoveredLife>
      <ns1:CoverageDeclines/>
      <ns1:CoveredLifeHolder>
      <ns1:Contacts/>
      <ns1:DefaultAddress/>
      <ns1:DefaultEmail/>
      <ns1:DefaultPhone/>
    Please throw some ideas.
    Thank you
    John

    Here is my XSD:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:tns="http://pac.bluecross.ca/Common/Types" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://pac.bluecross.ca/Common/Types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:complexType name="BusinessObject">
        <xs:sequence>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="BusinessObject" nillable="true" type="tns:BusinessObject" />
      <xs:simpleType name="CancelReasonCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="LaidOff">
          </xs:enumeration>
          <xs:enumeration value="Retired">
          </xs:enumeration>
          <xs:enumeration value="Divorced">
          </xs:enumeration>
          <xs:enumeration value="Separated">
          </xs:enumeration>
          <xs:enumeration value="NoLongerEligibleForCoverage">
          </xs:enumeration>
          <xs:enumeration value="MaternityLeave">
          </xs:enumeration>
          <xs:enumeration value="LeaveOfAbsense">
          </xs:enumeration>
          <xs:enumeration value="OnDisability">
          </xs:enumeration>
          <xs:enumeration value="PensionExpired">
          </xs:enumeration>
          <xs:enumeration value="StrikeOrLockout">
          </xs:enumeration>
          <xs:enumeration value="TransferredToAnotherCarrier">
          </xs:enumeration>
          <xs:enumeration value="WaivedBenefitsNoReason">
          </xs:enumeration>
          <xs:enumeration value="WaivedBenefitsSpousalCoverage">
          </xs:enumeration>
          <xs:enumeration value="LeftCompany">
          </xs:enumeration>
          <xs:enumeration value="DisContinuedCoverage">
          </xs:enumeration>
          <xs:enumeration value="NoProvincialMedicalPlan">
          </xs:enumeration>
          <xs:enumeration value="Transferred">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="CancelReasonCodes" nillable="true" type="tns:CancelReasonCodes" />
      <xs:simpleType name="CorrespondenceMethodCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Mail">
          </xs:enumeration>
          <xs:enumeration value="Telephone">
          </xs:enumeration>
          <xs:enumeration value="Email">
          </xs:enumeration>
          <xs:enumeration value="FTP">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="CorrespondenceMethodCodes" nillable="true" type="tns:CorrespondenceMethodCodes" />
      <xs:simpleType name="CorrespondenceTypeCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Home">
          </xs:enumeration>
          <xs:enumeration value="Office">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="CorrespondenceTypeCodes" nillable="true" type="tns:CorrespondenceTypeCodes" />
      <xs:simpleType name="CoveredLifeStatusCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Inforce">
          </xs:enumeration>
          <xs:enumeration value="Terminated">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="CoveredLifeStatusCodes" nillable="true" type="tns:CoveredLifeStatusCodes" />
      <xs:simpleType name="DependentCategoryCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Child">
          </xs:enumeration>
          <xs:enumeration value="Spouse">
          </xs:enumeration>
          <xs:enumeration value="Insured">
          </xs:enumeration>
          <xs:enumeration value="Dependent">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="DependentCategoryCodes" nillable="true" type="tns:DependentCategoryCodes" />
      <xs:simpleType name="DependentSubCategoryCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Student">
          </xs:enumeration>
          <xs:enumeration value="Minor">
          </xs:enumeration>
          <xs:enumeration value="CommonLaw">
          </xs:enumeration>
          <xs:enumeration value="Married">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="DependentSubCategoryCodes" nillable="true" type="tns:DependentSubCategoryCodes" />
      <xs:simpleType name="EmploymentTypeCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Director">
          </xs:enumeration>
          <xs:enumeration value="FullTimeSalary">
          </xs:enumeration>
          <xs:enumeration value="FullTimeHourly">
          </xs:enumeration>
          <xs:enumeration value="PartTimeSalary">
          </xs:enumeration>
          <xs:enumeration value="PartTimeHourly">
          </xs:enumeration>
          <xs:enumeration value="OwnerOperator">
          </xs:enumeration>
          <xs:enumeration value="Retired">
          </xs:enumeration>
          <xs:enumeration value="Seasonal">
          </xs:enumeration>
          <xs:enumeration value="Casual">
          </xs:enumeration>
          <xs:enumeration value="Client">
          </xs:enumeration>
          <xs:enumeration value="Consultant">
          </xs:enumeration>
          <xs:enumeration value="Contract">
          </xs:enumeration>
          <xs:enumeration value="ElectedOfficial">
          </xs:enumeration>
          <xs:enumeration value="JobShare">
          </xs:enumeration>
          <xs:enumeration value="Temporary">
          </xs:enumeration>
          <xs:enumeration value="Volunteer">
          </xs:enumeration>
          <xs:enumeration value="MSDRecipientnotEE">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="EmploymentTypeCodes" nillable="true" type="tns:EmploymentTypeCodes" />
      <xs:simpleType name="FamilyCategoryCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Single">
          </xs:enumeration>
          <xs:enumeration value="Family">
          </xs:enumeration>
          <xs:enumeration value="Couple">
          </xs:enumeration>
          <xs:enumeration value="NotApplicable">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="FamilyCategoryCodes" nillable="true" type="tns:FamilyCategoryCodes" />
      <xs:simpleType name="FrequencyCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Annual">
          </xs:enumeration>
          <xs:enumeration value="BiMonthly">
          </xs:enumeration>
          <xs:enumeration value="BiWeekly">
          </xs:enumeration>
          <xs:enumeration value="Hourly">
          </xs:enumeration>
          <xs:enumeration value="Monthly">
          </xs:enumeration>
          <xs:enumeration value="Quarterly">
          </xs:enumeration>
          <xs:enumeration value="SemiAnnually">
          </xs:enumeration>
          <xs:enumeration value="SemiMonthly">
          </xs:enumeration>
          <xs:enumeration value="Weekly">
          </xs:enumeration>
          <xs:enumeration value="LifeTime">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="FrequencyCodes" nillable="true" type="tns:FrequencyCodes" />
      <xs:simpleType name="IncomeTypeCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Salary">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="IncomeTypeCodes" nillable="true" type="tns:IncomeTypeCodes" />
      <xs:simpleType name="LanguageCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="ENG">
          </xs:enumeration>
          <xs:enumeration value="FRA">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="LanguageCodes" nillable="true" type="tns:LanguageCodes" />
      <xs:simpleType name="LineOfBusinessCategoryCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Health">
          </xs:enumeration>
          <xs:enumeration value="Dental">
          </xs:enumeration>
          <xs:enumeration value="Life">
          </xs:enumeration>
          <xs:enumeration value="AccidentalDeathAndDismemberment">
          </xs:enumeration>
          <xs:enumeration value="Disability">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="LineOfBusinessCategoryCodes" nillable="true" type="tns:LineOfBusinessCategoryCodes" />
      <xs:simpleType name="ProvinceCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="AB">
          </xs:enumeration>
          <xs:enumeration value="BC">
          </xs:enumeration>
          <xs:enumeration value="MB">
          </xs:enumeration>
          <xs:enumeration value="NB">
          </xs:enumeration>
          <xs:enumeration value="NL">
          </xs:enumeration>
          <xs:enumeration value="NT">
          </xs:enumeration>
          <xs:enumeration value="NS">
          </xs:enumeration>
          <xs:enumeration value="ON">
          </xs:enumeration>
          <xs:enumeration value="PE">
          </xs:enumeration>
          <xs:enumeration value="QC">
          </xs:enumeration>
          <xs:enumeration value="SK">
          </xs:enumeration>
          <xs:enumeration value="YT">
          </xs:enumeration>
          <xs:enumeration value="NU">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="ProvinceCodes" nillable="true" type="tns:ProvinceCodes" />
      <xs:simpleType name="ReapplicationReasonCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Exception">
          </xs:enumeration>
          <xs:enumeration value="Invalid">
          </xs:enumeration>
          <xs:enumeration value="Valid">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="ReapplicationReasonCodes" nillable="true" type="tns:ReapplicationReasonCodes" />
      <xs:simpleType name="SexCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Male">
          </xs:enumeration>
          <xs:enumeration value="Female">
          </xs:enumeration>
          <xs:enumeration value="NotApplicable">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="SexCodes" nillable="true" type="tns:SexCodes" />
      <xs:simpleType name="StateCodes">
        <xs:restriction base="xs:string">
          <xs:enumeration value="AL">
          </xs:enumeration>
          <xs:enumeration value="AK">
          </xs:enumeration>
          <xs:enumeration value="AZ">
          </xs:enumeration>
          <xs:enumeration value="AR">
          </xs:enumeration>
          <xs:enumeration value="CA">
          </xs:enumeration>
          <xs:enumeration value="Colorado">
          </xs:enumeration>
          <xs:enumeration value="CT">
          </xs:enumeration>
          <xs:enumeration value="DE">
          </xs:enumeration>
          <xs:enumeration value="DC">
          </xs:enumeration>
          <xs:enumeration value="FL">
          </xs:enumeration>
          <xs:enumeration value="GA">
          </xs:enumeration>
          <xs:enumeration value="HI">
          </xs:enumeration>
          <xs:enumeration value="ID">
          </xs:enumeration>
          <xs:enumeration value="IL">
          </xs:enumeration>
          <xs:enumeration value="IN">
          </xs:enumeration>
          <xs:enumeration value="IA">
          </xs:enumeration>
          <xs:enumeration value="KS">
          </xs:enumeration>
          <xs:enumeration value="KY">
          </xs:enumeration>
          <xs:enumeration value="LA">
          </xs:enumeration>
          <xs:enumeration value="ME">
          </xs:enumeration>
          <xs:enumeration value="MD">
          </xs:enumeration>
          <xs:enumeration value="MA">
          </xs:enumeration>
          <xs:enumeration value="MI">
          </xs:enumeration>
          <xs:enumeration value="MN">
          </xs:enumeration>
          <xs:enumeration value="MS">
          </xs:enumeration>
          <xs:enumeration value="MO">
          </xs:enumeration>
          <xs:enumeration value="MT">
          </xs:enumeration>
          <xs:enumeration value="NE">
          </xs:enumeration>
          <xs:enumeration value="NV">
          </xs:enumeration>
          <xs:enumeration value="NH">
          </xs:enumeration>
          <xs:enumeration value="NJ">
          </xs:enumeration>
          <xs:enumeration value="NM">
          </xs:enumeration>
          <xs:enumeration value="NY">
          </xs:enumeration>
          <xs:enumeration value="NC">
          </xs:enumeration>
          <xs:enumeration value="ND">
          </xs:enumeration>
          <xs:enumeration value="OH">
          </xs:enumeration>
          <xs:enumeration value="OK">
          </xs:enumeration>
          <xs:enumeration value="OR">
          </xs:enumeration>
          <xs:enumeration value="PA">
          </xs:enumeration>
          <xs:enumeration value="RI">
          </xs:enumeration>
          <xs:enumeration value="SC">
          </xs:enumeration>
          <xs:enumeration value="SD">
          </xs:enumeration>
          <xs:enumeration value="TN">
          </xs:enumeration>
          <xs:enumeration value="TX">
          </xs:enumeration>
          <xs:enumeration value="UT">
          </xs:enumeration>
          <xs:enumeration value="VT">
          </xs:enumeration>
          <xs:enumeration value="VA">
          </xs:enumeration>
          <xs:enumeration value="WA">
          </xs:enumeration>
          <xs:enumeration value="WV">
          </xs:enumeration>
          <xs:enumeration value="WI">
          </xs:enumeration>
          <xs:enumeration value="WY">
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="StateCodes" nillable="true" type="tns:StateCodes" />
      <xs:complexType name="Address">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="City" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Country" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Line1" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Line2" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Line3" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Line4" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Address" nillable="true" type="tns:Address" />
      <xs:complexType name="InternationalAddress">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Address">
            <xs:sequence>
              <xs:element minOccurs="0" name="Region" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="PostalCode" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="InternationalAddress" nillable="true" type="tns:InternationalAddress" />
      <xs:complexType name="CanadianAddress">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Address">
            <xs:sequence>
              <xs:element minOccurs="0" name="PostalCode" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Province" nillable="true" type="tns:ProvinceCodes" />
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="CanadianAddress" nillable="true" type="tns:CanadianAddress" />
      <xs:complexType name="AmericanAddress">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Address">
            <xs:sequence>
              <xs:element minOccurs="0" name="State" nillable="true" type="tns:StateCodes">
              </xs:element>
              <xs:element minOccurs="0" name="ZipCode" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="AmericanAddress" nillable="true" type="tns:AmericanAddress" />
      <xs:complexType name="Person">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Client">
            <xs:sequence>
              <xs:element minOccurs="0" name="DateOfBirth" nillable="true" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="FirstName" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="LastName" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="MaidenName" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="MiddleName" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="PreferredName" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="***" type="tns:SexCodes">
              </xs:element>
              <xs:element minOccurs="0" name="Suffix" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Person" nillable="true" type="tns:Person" />
      <xs:complexType name="Client">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Contacts" nillable="true" type="tns:ArrayOfContactInformation">
              </xs:element>
              <xs:element minOccurs="0" name="DefaultAddress" nillable="true" type="tns:Address">
              </xs:element>
              <xs:element minOccurs="0" name="DefaultEmail" nillable="true" type="tns:ContactInformation">
              </xs:element>
              <xs:element minOccurs="0" name="DefaultPhone" nillable="true" type="tns:ContactInformation">
              </xs:element>
              <xs:element minOccurs="0" name="PreferredContact" nillable="true" type="tns:CorrespondenceMethodCodes">
              </xs:element>
              <xs:element minOccurs="0" name="PreferredLanguage" nillable="true" type="tns:LanguageCodes">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Client" nillable="true" type="tns:Client" />
      <xs:complexType name="Division">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Structurable">
            <xs:sequence>
              <xs:element minOccurs="0" name="Code" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="SubDivisions" nillable="true" type="tns:ArrayOfDivision">
              </xs:element>
              <xs:element minOccurs="0" name="EffectiveDate" nillable="true" type="xs:dateTime">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Division" nillable="true" type="tns:Division" />
      <xs:complexType name="Structurable">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Structurable" nillable="true" type="tns:Structurable" />
      <xs:complexType name="CoveredLife">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="ApplicationDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="CancelReason" nillable="true" type="tns:CancelReasonCodes">
              </xs:element>
              <xs:element minOccurs="0" name="CoverageDeclines" nillable="true" type="tns:ArrayOfBenefitDecline">
              </xs:element>
              <xs:element minOccurs="0" name="CoveredLifeHolder" nillable="true" type="tns:Person">
              </xs:element>
              <xs:element minOccurs="0" name="DependentCategory" nillable="true" type="tns:DependentCategoryCodes">
              </xs:element>
              <xs:element minOccurs="0" name="DependentSubCategory" nillable="true" type="tns:DependentSubCategoryCodes">
              </xs:element>
              <xs:element minOccurs="0" name="EffectiveDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="Number" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="QualificationDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="Status" nillable="true" type="tns:CoveredLifeStatusCodes">
              </xs:element>
              <xs:element minOccurs="0" name="TerminationDate" type="xs:dateTime">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="CoveredLife" nillable="true" type="tns:CoveredLife" />
      <xs:complexType name="Certificate">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Class" nillable="true" type="tns:Class">
              </xs:element>
              <xs:element minOccurs="0" name="CurrentEmploymentRecord" nillable="true" type="tns:EmploymentRecord">
              </xs:element>
              <xs:element minOccurs="0" name="CurrentIncome" nillable="true" type="tns:Income">
              </xs:element>
              <xs:element minOccurs="0" name="Dependents" nillable="true" type="tns:ArrayOfCoveredLife">
              </xs:element>
              <xs:element minOccurs="0" name="Division" nillable="true" type="tns:Division">
              </xs:element>
              <xs:element minOccurs="0" name="FamilyCategory" nillable="true" type="tns:FamilyCategoryCodes">
              </xs:element>
              <xs:element minOccurs="0" name="HealthCareSpendingAccountInformation" nillable="true" type="tns:HealthCareSpendingAccountInformation">
              </xs:element>
              <xs:element minOccurs="0" name="HireDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="InsuredCoveredLife" nillable="true" type="tns:CoveredLife">
              </xs:element>
              <xs:element minOccurs="0" name="JobTitle" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Number" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="PayrollNumber" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Plan" nillable="true" type="tns:Plan">
              </xs:element>
              <xs:element minOccurs="0" name="RegionalAdministration" nillable="true" type="tns:RegionalAdministrativeInformation">
              </xs:element>
              <xs:element minOccurs="0" name="Section" nillable="true" type="tns:Section">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Certificate" nillable="true" type="tns:Certificate" />
      <xs:complexType name="Policy">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Structurable">
            <xs:sequence>
              <xs:element minOccurs="0" name="Code" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="Certificates" nillable="true" type="tns:ArrayOfCertificate">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Policy" nillable="true" type="tns:Policy" />
      <xs:complexType name="Class">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Structurable">
            <xs:sequence>
              <xs:element minOccurs="0" name="Code" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="EffectiveDate" type="xs:dateTime">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Class" nillable="true" type="tns:Class" />
      <xs:complexType name="Plan">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:Structurable">
            <xs:sequence>
              <xs:element minOccurs="0" name="Code" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="EffectiveDate" type="xs:dateTime" />
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Plan" nillable="true" type="tns:Plan" />
      <xs:complexType name="ArrayOfPolicy">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="Policy" nillable="true" type="tns:Policy" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfPolicy" nillable="true" type="tns:ArrayOfPolicy" />
      <xs:complexType name="BenefitDecline">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="ChangeEffectiveDate" nillable="true" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="DeclineReason" nillable="true" type="tns:CancelReasonCodes">
              </xs:element>
              <xs:element minOccurs="0" name="Declined" nillable="true" type="xs:boolean">
              </xs:element>
              <xs:element minOccurs="0" name="LineOfBusinessCategory" nillable="true" type="tns:LineOfBusinessCategoryCodes">
              </xs:element>
              <xs:element minOccurs="0" name="ReapplicationReason" nillable="true" type="tns:ReapplicationReasonCodes">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="BenefitDecline" nillable="true" type="tns:BenefitDecline" />
      <xs:complexType name="ContactInformation">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="CorrespondenceMethod" nillable="true" type="tns:CorrespondenceMethodCodes">
              </xs:element>
              <xs:element minOccurs="0" name="CorrespondenceNote" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="CorrespondenceType" nillable="true" type="tns:CorrespondenceTypeCodes">
              </xs:element>
              <xs:element minOccurs="0" name="Data" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="ContactInformation" nillable="true" type="tns:ContactInformation" />
      <xs:complexType name="EmploymentRecord">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="EffectiveDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="Frequency" nillable="true" type="tns:FrequencyCodes">
              </xs:element>
              <xs:element minOccurs="0" name="HoursWorked" type="xs:decimal">
              </xs:element>
              <xs:element minOccurs="0" name="SalaryAmount" nillable="true" type="xs:decimal">
              </xs:element>
              <xs:element minOccurs="0" name="Type" nillable="true" type="tns:EmploymentTypeCodes">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="EmploymentRecord" nillable="true" type="tns:EmploymentRecord" />
      <xs:complexType name="Enrollment">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Policies" nillable="true" type="tns:ArrayOfPolicy">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Enrollment" nillable="true" type="tns:Enrollment" />
      <xs:complexType name="HealthCareSpendingAccountInformation">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="AllocationAmount" type="xs:decimal">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="HealthCareSpendingAccountInformation" nillable="true" type="tns:HealthCareSpendingAccountInformation" />
      <xs:complexType name="Income">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Amount" type="xs:decimal">
              </xs:element>
              <xs:element minOccurs="0" name="EffectiveDate" type="xs:dateTime">
              </xs:element>
              <xs:element minOccurs="0" name="Frequency" nillable="true" type="tns:FrequencyCodes">
              </xs:element>
              <xs:element minOccurs="0" name="Type" nillable="true" type="tns:IncomeTypeCodes">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Income" nillable="true" type="tns:Income" />
      <xs:complexType name="RegionalAdministrativeInformation">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Country" nillable="true" type="xs:string">
              </xs:element>
              <xs:element minOccurs="0" name="ProvinceOfBilling" nillable="true" type="tns:ProvinceCodes">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="RegionalAdministrativeInformation" nillable="true" type="tns:RegionalAdministrativeInformation" />
      <xs:complexType name="Section">
        <xs:complexContent mixed="false">
          <xs:extension base="tns:BusinessObject">
            <xs:sequence>
              <xs:element minOccurs="0" name="Code" nillable="true" type="xs:string">
              </xs:element>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="Section" nillable="true" type="tns:Section" />
      <xs:complexType name="ArrayOfContactInformation">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="ContactInformation" nillable="true" type="tns:ContactInformation" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfContactInformation" nillable="true" type="tns:ArrayOfContactInformation" />
      <xs:complexType name="ArrayOfDivision">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="Division" nillable="true" type="tns:Division" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfDivision" nillable="true" type="tns:ArrayOfDivision" />
      <xs:complexType name="ArrayOfCertificate">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="Certificate" nillable="true" type="tns:Certificate" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfCertificate" nillable="true" type="tns:ArrayOfCertificate" />
      <xs:complexType name="ArrayOfCoveredLife">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="CoveredLife" nillable="true" type="tns:CoveredLife" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfCoveredLife" nillable="true" type="tns:ArrayOfCoveredLife" />
      <xs:complexType name="ArrayOfBenefitDecline">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="BenefitDecline" nillable="true" type="tns:BenefitDecline" />
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfBenefitDecline" nillable="true" type="tns:ArrayOfBenefitDecline" />
    </xs:schema><!-- BusinessObjects Version 3.2.471 -->

  • How to Remove a Node from JTree?

    I want to remove a node from a JTree but the node may or maynot be visible.
    My method takes a String which is the name of the node.
    The nodes im using are DefaultMutableTreeNode
    This is my code so far but it doesnt work.
    public void removePerson(String pName)
              TreePath node = tree.getNextMatch(pName,0,Position.Bias.Forward);
              tree.expandPath(node);
              tree.removeSelectionPath(node);
    }Any Suggestions or ways which i could achive this?
    Thank you,

    I don't think removeSelectionPath is what you want to use.
    These should help:
    [http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/tree/DefaultTreeModel.html#removeNodeFromParent(javax.swing.tree.MutableTreeNode)|http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/tree/DefaultTreeModel.html#removeNodeFromParent(javax.swing.tree.MutableTreeNode)]
    [http://www.roseindia.net/java/example/java/swing/RemoveNodes.shtml|http://www.roseindia.net/java/example/java/swing/RemoveNodes.shtml]

  • How to remove empty tags from XML

    Hello,
    I have a XML file which contains some empty tags and some values with "?". I need to remove all empty tags and tags which have a value "?".
    Sample Data:
    <a>
    <b></b>
    <c> Hello </c>
    <d>world ?</d>
    <e>oracle</e>
    </a>
    Expected result:
    <a>
    <c> Hello </c>
    <e>oracle</e>
    </a>
    Thank you for your time.
    Thanks,
    Edited by: 850749 on Apr 7, 2011 6:25 PM

    Dear Odie,
    May I make your example a bit more complicated by adding an additional complexType, please:
    ---Original ----
    <DEPT>
    <EMPID>1</EMPID>
    <EMPNAME>Martin Chadderton</EMPNAME>
    <SALARY>??</SALARY>
    <SALARYq></SALARYq>
    </DEPT>
    ----- New ----
    <DEPT>
    <EMPID>1</EMPID>
    <EMPNAME>Martin Chadderton</EMPNAME>
    <SALARY>??</SALARY>
    <SALARYq></SALARYq>
    <EMPLMNT_HISTORY>
    <DEVISION>1</DEVISION>
    <FROM_DATE>2011-01-01 </FROM_DATE>
    <TO_DATE></TO_DATE>
    </EMPLMNT_HISTORY>
    </DEPT>
    Your solution works perfectly for <SALARY>, but how would you suggest also to deal with <TO_DATE> ?
    Massive thanks for your help!
    N.B. Just to emphasise, in my case I have 3 levels (complexType > complexType > complexType) and many elements and I would like to know if there is any generic option to say
    to remove all the empty elements from the result, as it causes to the SSJ (Systinet) Webservice to crash.

  • How to remove empty space from a file

    Hi all,
    Can any one help on how to remove the blank spaces from a file.
    I used trim function but unable to remove the spaces.
    I have a file in which there is a name like 'JAIRAM' and am storing this file in a variable FILE_CONTENTS.
    Now am unable to compare FILE_CONTENTS with another value as it is storing empty spaces also from the file.
    Please help on this
    Thanks,
    Srini

    Trim only trim at the beginning or at the end. Can you try using the replace sql function.. see below..
    SQL> select replace('abc def',' ','') from dual ;
    REPLAC
    abcdef
    cheers

  • How to remove a node from  a Jtree?

    I tried giving this to move a node from one parent node to other parent node.
    IconNodeClass userObject = (IconNodeClass)tr.getTransferData(TransferableDataItem.Image_Tree_Node_Flavor);
    IconNodeClass node = (IconNodeClass)path.getLastPathComponent();
    IconNodeClass newNode = new IconNodeClass(userObject);
    DefaultTreeModel model = (DefaultTreeModel)getModel();
    IconNodeClass oldParentNode = (IconNodeClass)userObject.getParent();
    Object oldParent = oldParentNode.getUserObject();
    Object newParent = node.getUserObject();
    if(oldParent.equals(newParent)) {
    model.insertNodeInto(newNode, node, 0);
    if(oldParentNode != null) {
    oldParentNode.remove(newNode);
    model.reload(oldParentNode);
    }

    what happened next ?????

  • How to remove empty row from rfc table output.

    Hello,
      I am using adaptive rfc and printing table output. The table rows start from 2nd row, the first row being empty. How can I remove the empty first row.
    Here is what I tried.
    wdContext.nodeDataSource().nodeTableOutput().moveNext();
    and
    wdContext.nodeDataSource().nodeTableOutput().moveTo(1);
    Neither of them worked. Any clue is appreciated.
    Srinivas

    IWDNodeElement first = wdContext.nodeDataSource().nodeTableOutput().getElementAt(0);
    wdContext.nodeDataSource().nodeTableOutput().removeElement(first);
    Armin

Maybe you are looking for

  • Safari 5.1.7 Has Stopped Working, Windows 7 64 bit

    Hello everyone, I am having a terrible time getting Safari to play nice with Windows here. I am getting an error that I have found no other information about when Safari crashes. The error is listed below: Problem signature:   Problem Event Name:    

  • How do I update my ipad to 7.0.3?

    How do I update my ipad to iOS 7.0.3?

  • Messages sent from pc nokia browser not stored

    I have a nokia 6131, windows xp mce 2002 sp2 on an asus s6 portable and nokia pc suite 6.83.14.1 and a toshiba stack bluetooth connection. Language on the pc and the phone is Swedish in all cases. When I send messages from the nokia phone browser win

  • JSP compilation: code too large on SP14

    Hello, I developed EP application based on JSPDynPage on SP13 with big jsp file. This application was running on SP13 without problem. Later, we upgraded to SP14 and application logged exception: "code too large" when compiling jsp. I tried to devide

  • PS 7.0 Animation

    I know CS3 has the ability to ad animation to web friendly .gif files, I looked in ps 7 help and it says to go to "windows then animation". I don't see the option for animation. Is there a way to bring it up? Thanks