Node value changning

hi all,
I have a node with 2 subnodes
BOOK_DET ( cardinality 1:1)
      BOOKING_TOTAL  type i
      BOOKING_AMOUNT type string
and both are bound to 2 textedit controls and it's not readonly.
I tried to change the contents using supply functions.
LV_BOOKING_AMOUNT = 'some value'.
  LO_EL_BOOK_DET->SET_ATTRIBUTE(
    EXPORTING
      VALUE = LV_BOOKING_AMOUNT
    IMPORTING
      NAME =  `BOOKING_AMOUNT`
but it's shows error that,
the field 'booking_amout' cannot be changed.
what the really happens here ????
regards
jose

hi jijo.....
    first of all.... i am sure that you are referring BOOK_DET ( cardinality 1:1)
as a node and
BOOKING_TOTAL type i
BOOKING_AMOUNT type string
as attributes.
when you are using set_attribute, you should not have an importing parameter.
it should be like this
LO_EL_BOOK_DET->SET_ATTRIBUTE(
EXPORTING
name = LV_BOOKING_AMOUNT
value = `BOOKING_AMOUNT`
---regards,
   alex b justin

Similar Messages

  • Assigning a node value from an XML variable to a String type  in Weblogic Process Integrator

    Hi,
    Is there any way to assign a node value from an XML variable to a String variable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

    Nerendra
    Are you talking about using Xpath on the XML document and assigning to a
    variable, it is unclear what you are asking
    Tony
    "Narendra" <[email protected]> wrote in message
    news:3bba1215$[email protected]..
    >
    Hi,
    Is there any way to assign a node value from an XML variable to a Stringvariable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • How to modify a node value in a DOM tree?

    I have following code; it parses a XML file from a file and builds a in-memory DOM tree, but when I tries to modify one of the node value, it keeps telling me: oracle.xml.parser.v2.XMLDOMException: Node cannot be modified. How do I do it?
    // ==================================
    DOMParser theParser = new DOMParser();
    theParser.setValidationMode(false);
    InputStream theInputStream = myApp.class.getResourceAsStream("/test.xml");
    theParser.parse(theInputStream);
    XMLDocument theXMLDoc = theParser.getDocument();
    NodeList theNodeList = theXMLDoc.selectNodes("/root/child");
    for (int i = 0; i < theNodeList.getLength(); i++)
    theNodeList.item(i).setNodeValue("test");
    null

    You're trying to set the node value of an element, which cannot have a node value.
    You need to set the node value of the text-node child of the element instead.
    Or remove the current text-node child and append a new text-node child with the new value.

  • How to get a Tree Node Value when a Tree is Expanded

    My reqiurement is when i Expand a Tree i need the Expanded tree Node Value. For Example Consider Parent as a Root Node of a Tree, and Consider its two Children Child1 and Child2.
    When + Parent Expanded
    I will Get the Output as --Parent
    - Child1
    - Child2
    so As when i expand the Tree i must Get the String Value Parent.

    duplicate
    How to get a Tree Node Value when a Tree is Expanded

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • Store XML node value into an array with node element name

    Hi,
    I have the following code that displays the node element with the
    corresponding node value. I want to store the values in an array in
    reference to the node name.
    i.e.
    XML (my xml is much bigger than this, 300 elements):
    <stock>
    <symbol>SUNW</symbol>
    <price>17.1</price>
    </stock>-----
    would store the following:
    *data[symbol] = SUNW;*
    *data[price] = 17.1;*
    Thanks in advance,
    Tony
    test.jsp
    Here's my source code:
    <html>
    <head>
    <title>dom parser</title>
    <%@ page import="javax.xml.parsers.*" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="dombean.*" %>
    </head>
    <body bgcolor="#ffffcc">
    <center>
    <h3>Pathways Info</h3>
    <table border="2" width="50%">
    <jsp:useBean id="domparser" class="dombean.MyDomParserBean" />
    <%
    Document doc = domparser.getDocument("c:/stocks/stocks.xml");
    traverseTree(doc, out);
    %>
    <%! private void traverseTree(Node node,JspWriter out) throws Exception {
    if(node == null) {
    return;
    int type = node.getNodeType();
    switch (type) {
    // handle document nodes
    case Node.DOCUMENT_NODE: {
    out.println("<tr>");
    traverseTree
    (((Document)node).getDocumentElement(),
    out);
    break;
    // handle element nodes
    case Node.ELEMENT_NODE: {
    String elementName = node.getNodeName();
    //if(elementName.equals("MOTHER-OCC-YRS-PREVIOUS")) {
    //out.println("</tr>");
    out.println("<tr><td>"+elementName+"</td>");
    NodeList childNodes =
    node.getChildNodes();     
    if(childNodes != null) {
    int length = childNodes.getLength();
    for (int loopIndex = 0; loopIndex <
    length ; loopIndex++)
    traverseTree
    (childNodes.item(loopIndex),out);
    break;
    // handle text nodes
    case Node.TEXT_NODE: {
    String data = node.getNodeValue().trim();
    //if((data.indexOf("\n")  <0) &#38;&#38; (data.length() > 0)) {
    out.println("<td>"+data+"</td></tr>");
    %>
    </table>
    </body>
    </html>
    {code}
    *MyDomParserBean.java*
    Code: package dombean;
    {code:java}
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.io.*;
    public class MyDomParserBean
    implements java.io.Serializable {
    public MyDomParserBean() {
    public static Document
    getDocument(String file) throws Exception {
    // Step 1: create a DocumentBuilderFactory
    DocumentBuilderFactory dbf =
    DocumentBuilderFactory.newInstance();
    // Step 2: create a DocumentBuilder
    DocumentBuilder db = dbf.newDocumentBuilder();
    // Step 3: parse the input file to get a Document object
    Document doc = db.parse(new File(file));
    return doc;
    {code}
    Edited by: ynotlim333 on Sep 24, 2007 8:41 PM
    Edited by: ynotlim333 on Sep 24, 2007 8:44 PM
    Edited by: ynotlim333 on Sep 24, 2007 8:45 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I still need to store it in an array because its 300 elements in the XML stocks.
    I've done the following but its not working, i'm getting error codes. I think its an easy fix. I'd also like to pass a String instead of a .xml document b/c my xml is stored inside a DB. Any suggestions on that?
    <html>
    <head>
    <title>dom parser</title>
    <%@ page import="javax.xml.parsers.*" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="org.*" %>
    </head>
    <body bgcolor="#ffffcc">
    <center>
    <h3>Pathways Info</h3>
    <table border="2" width="50%">
    <jsp:useBean id="domparser" class="org.MyDomParserBean" />
    <%
    Document doc = domparser.getDocument("c:/stocks/stocks.xml");
    traverseTree(doc, out);
    %>
    <%!
            public String element_store = null;
            public String[] stock_data = new String[400];
            private void traverseTree(Node node,JspWriter out) throws Exception {
            if(node == null) {
               return;
            int type = node.getNodeType();
            switch (type) {
               // handle document nodes
               case Node.DOCUMENT_NODE: {
                 out.println("<tr>");
                 traverseTree
                 (((Document)node).getDocumentElement(),
                 out);
                 break;
              // handle element nodes
              case Node.ELEMENT_NODE: {
                String elementName = node.getNodeName();
                element_store = elementName;
                 //if(elementName.equals("MOTHER-OCC-YRS-PREVIOUS")) {
                   //out.println("</tr>");
                 NodeList childNodes =
                 node.getChildNodes();     
                 if(childNodes != null) {
                    int length = childNodes.getLength();
                    for (int loopIndex = 0; loopIndex <
                    length ; loopIndex++)
                       traverseTree
                       (childNodes.item(loopIndex),out);
                  break;
               // handle text nodes
               case Node.TEXT_NODE: {
                  String data = node.getNodeValue().trim();
                  if((data.indexOf("\n")  <0) && (data.length() > 0)) {
                  out.println("<tr><td>"+element_store+"</td>");
                  out.println("<td>"+data+"</td></tr>");
                  stock_data[element_store]=data;
    %>
    </table>
    </body>
    </html>

  • How to get node value of XML file from XMLTYPE field of databases

    Hi,
    I want to select node value of XML from XMLTYPE field of oracle db into java code.
    Feel free to answer me if you have any idea about it.
    Thanks

    For XMLType refer
    http://www.oracle.com/oramag/oracle/01-nov/o61xml.html
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb04cre.htm

  • Read Selected Tree Node value.  Jdeveloper Jdeveloper 11.1.2.1.0 11.1.2.1.0

    Version: Jdeveloper 11.1.2.1.0
    how to get programmatically tree node value.
    i have tried but cann't read value from selected node.
    please help me.
    here is my application creation steps:
    1. New Application
    2. Fusion Web Application (ADF) Template
    3. Create View Object VOTreeMst
    Query:
         Select Department_Name,Department_Id
         From Departments
    4. Create View Object VOTreeChd
    Query:
         Select Last_Name,Employee_Id,Department_Id
         From Employees
    5. Create View Link VLTreeMstChd
         VOTreeMst.DepartmentId=VOTreeChd.DepartmentId
         And Add to Application Module
    6. Create page page1 in ViewController
         New-->Web Tier-->JSF/Facelets-->Page
         Selected Document Type JSP XML
    7. Drag VOTreeMst1 From Data Controls into page1
    and select Tree-->ADF Tree
    8. ADD java Code into selection Listener
    public void nodeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    CollectionModel collectionModel = (CollectionModel)tree.getValue();
    treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    String rowType = rw.getStructureDef().getDefName();
    if(rowType.equalsIgnoreCase("VOTreeMst")){
    System.out.println("This row is a department: " + rw.getAttribute("DepartmentId"));
    else if(rowType.equalsIgnoreCase("VOTreeChd")){
    System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
    else{
    System.out.println("Huh ????");
    // ... do more usefuls stuff here
    9. when i click on first node it is working but i click on second node it is not working
    error message::
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    I have also tried using following code but same problem
    public void onTreeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    treeBinding = (JUCtrlHierBinding)((CollectionModel)tree.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    System.out.println("row: " + rw.getAttribute(0));
    But
    If i create .jspx page From
    Web Tier->Jsp->page Then it is working fine
    when i create .jspx page From
    Web Tier->JSF\Facelets->page Then it is not working
    i need to get value from "Web Tier->JSF\Facelets->page"
    is there any help please?

    You should try Franks generic selectionListener http://www.oracle.com/technetwork/developer-tools/adf/learnmore/25-generic-tree-selection-listener-169164.pdf. For help on hoe to get the selected tree node data check http://www.oracle.com/technetwork/developer-tools/adf/learnmore/26-get-selected-tree-node-data-169165.pdf
    Timo

  • How can I include CDATA in the node-value?

    Hi Experts,
    Via XI I map an incoming mail message to an outgoing XML. To be sure to not run into problems, I want to put <![CDATA[ and ]]> around the node-values.
    Currently, I just do this in my message-mapping via a concatenate. The result LOOKS fine, but the XML-parser on the receiving application treats the CDATA as part of the total string and not as an indicator to accept every charachter within the node-value.
    How can I put this CDATA around the node-values in a correct manner?
    Thanks for your help!
    Regards
    William

    Hello,
    These Links will help you....
    This might help
    Message Mapping - same structure
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    http://www.cxml.org/files/downloads.cfm
    ******************************Reward points,if found useful

  • How to extract node value by using xpath in orchestration shape

    i want extract the node value by using xpath in expression shape in orch, then assign to variable.
    then decide shape in if branch im using check condition based nodevalue .
    str = xpath(Message_3, ("string(/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()=''])"));
    but i got below error:
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: 020779be-713d-408c-9ff4-fd1462c2e52c
    Shape name: Expression_1
    ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
    Exception thrown from: segment 1, progress 10
    Inner exception: There is an error in the XML document.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at Microsoft.XLANGs.Core.Part.XPathLoad(Part sourcePart, String xpath, Type dstType)
       at BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    Additional error information:
            <no xmlns=''> was not expected.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Read_string()
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_string()
       at System.Xml.Serialization.XmlSerializer.DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

    Hi,
    as per your  code i got below error 
    Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: f5fffb05-e6d6-4765-83da-4e6c9696dd8a
    Shape name: Expression_1
    ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
    Exception thrown from: segment 1, progress 10
    Inner exception: There is an error in the XML document.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializat
    this is my schema:
      <?xml version="1.0" encoding="utf-16"
    ?>
    <xs:schema xmlns="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
    xmlns:ns0="https://BizTalk_Server_ProjectRNd2.PropertySchema" targetNamespace="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
    <xs:appinfo>
    <b:imports>
      <b:namespace
    prefix="ns0" uri="https://BizTalk_Server_ProjectRNd2.PropertySchema" location=".\PropertySchema.xsd"
    />
      </b:imports>
      </xs:appinfo>
      </xs:annotation>
    <xs:element name="Root">
    <xs:annotation>
    <xs:appinfo>
    <b:properties>
      <b:property
    name="ns0:no" xpath="/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()='']"
    />
      </b:properties>
      </xs:appinfo>
      </xs:annotation>
    <xs:complexType>
    <xs:sequence>
      <xs:element
    name="no" type="xs:string" />
      <xs:element
    name="name" type="xs:string" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>

  • Special Characters in a Node Value

    Hi,
    I have a node value which contains special characters (ex: it contains degree *°* between the text). When I am adding this text value to a node i am using the following code,
    elementVariable.appendChild(documentObject.createTextNode("*node text value with different special characters*"));
    How to handle these special characters, because when I open the generated XML file in Web Browser it is displaying an error when parsing this text value which contains the degree symbol.
    Does anybody know how to handle this type of text values. If any one had links related to this, please send me.
    Thank You.

    Thanks for your reply DrClap. What you said regarding posting the query without understanding the code is correct. But I am not expert in XML and I didn't worked on it previously. I suddenly got the request to implement this in our application and i don't have time to learn, so i did some search and found the below code and used that in my program.
    It worked for all the types of data, but it is failing only for the degree character (*°*). Could you please check the below code and tell me where I am doing wrong. I really appreciate your help.
    * @Program to create a DOM XML tree and then print the XML.
    * Xmltree.java
    * Author:-RoseIndia Team
    * Date:-10-Jun-2008
    import java.io.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class Xmltree {
    public static void main(String[] args) throws Exception {
    DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = builderFactory.newDocumentBuilder();
    //creating a new instance of a DOM to build a DOM tree.
    Document doc = docBuilder.newDocument();
    new Xmltree().createXmlTree(doc);
    public void createXmlTree(Document doc) throws Exception {
    //This method creates an element node
    Element root = doc.createElement("Company");
    //adding a node after the last child node of the specified node.
    doc.appendChild(root);
    Element child = doc.createElement("Location");
    root.appendChild(child);
    Element child1 = doc.createElement("Companyname");
    child.appendChild(child1);
    Text text = doc.createTextNode("Roseindia .Net");
    child1.appendChild(text);
    Comment comment = doc.createComment("Employee in roseindia");
    child.appendChild(comment);
    Element element = doc.createElement("Employee");
    child.appendChild(element);
    Text text1 = doc.createTextNode("Girish Tewari");
    element.appendChild(text1);
    Element chilE = doc.createElement("Id");
    chilE.setAttribute("name", "Girish");
    root.appendChild(chilE);
    // adding a text element to the child
    Text text12 = doc.createTextNode("status");
    chilE.appendChild(text12);
    //TransformerFactory instance is used to create Transformer objects.
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    // create string from xml tree
    StringWriter sw = new StringWriter();
    StreamResult result = new StreamResult(sw);
    DOMSource source = new DOMSource(doc);
    transformer.transform(source, result);
    String xmlString = sw.toString();
    File file = new File("newxml.xml");
    BufferedWriter bw = new BufferedWriter
    (new OutputStreamWriter(new FileOutputStream(file)));
    bw.write(xmlString);
    bw.flush();
    bw.close();
    // print xml
    System.out.println("Xml file created is :\n" + xmlString);
    Edited by: Ramesh_Pappala on Oct 13, 2008 7:07 AM

  • Read a XML node value/attribute value from a CLOB

    Hello,
    I can write SQL/ - PL/SQL "straightforward" but now I have a problem what is to big for me.  I hop that someone can help.
    We create by code a xml structure and write these into the oracle database CLOB field. I'm sorry to say that a xml text structure is written into a clob in stead of a xmltype field. (it's a design failure?) It's a large xml structure. I believe I can't attach a file so I put at the end of this discussion a light example of the xml structure.
    It's a xml with quartervalue's, so there are 35040 detail rows (24h * 4 * 365days). I want to accumulate the the attribute Amount value 9. The amount value is in the Detail node a attribute but at the end you can see that for the DST are also 4 value's, but these are not attribute value's but node value's. (In this case it are four value's in some cases there is one DST amount value.
    Can somebody help me how to accumulate all the detail attribute value Amount with the node value Amount of the DST tag?
    XML structure:
    <?xml version="1.0"?>
    <Message xmlns:ns1="http://automaticdealcapture/">
        <BusinessDocument messageDateTime="2013-10-25T13:59:31+02:00" ediReference="LO-461967" messageName="New" businessSector="Z" documentFunction="Original">
            <DocumentData>
                <ns1:Adcs>
                    <ns1:Package>
                        <ns1:Deal>
                            <ns1:ProductCode>PWCODE</ns1:ProductCode>
                            <ns1:Action>NEW</ns1:Action>
                            <ns1:Memo1>MemoField</ns1:Memo1>
                            <ns1:Details>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="00:00:00" Timee="01:00:00" Amount="0.0153" Price="11.111"/>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="01:00:00" Timee="02:00:00" Amount="0.015" Price="22.222"/>
                                etc. 350040 detail rows.
                            </ns1:Details>
                            <ns1:DSTS>
                                <ns1:Year Val="2014">
                                    <ns1:DST Period="1">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="2">
                                        <ns1:Amount>0.0222</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="3">
                                        <ns1:Amount>0.0444</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="4">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                </ns1:Year>
                            </ns1:DSTS>
                        </ns1:Deal>
                    </ns1:Package>
                </ns1:Adcs>
            </DocumentData>
        </BusinessDocument>
    </Message>

    From what I know, extracting the "Amount" values in the Details section and the "Amount" values in the DSTS section would be two different SELECT statements.
    Both of these will use XMLTable() to extract the values.
    BTW - If you need more information on this, post up in the XML/XML DB forum section for more complex help.  (eg getting YEAR with the DSTS Amount values)
    as far as XML size goes, I've seen oracle handle a 100MB XML document without problems.
    (just understand, it will be 'slow')
    This one will give you the Amount values from the DSTS section:
    with xml_data as ( SELECT
    XMLType('<?xml version="1.0"?>
    <Message xmlns:ns1="http://automaticdealcapture/">
        <BusinessDocument messageDateTime="2013-10-25T13:59:31+02:00" ediReference="LO-461967" messageName="New" businessSector="Z" documentFunction="Original">
            <DocumentData>
                <ns1:Adcs>
                    <ns1:Package>
                        <ns1:Deal>
                            <ns1:ProductCode>PWCODE</ns1:ProductCode>
                            <ns1:Action>NEW</ns1:Action>
                            <ns1:Memo1>MemoField</ns1:Memo1>
                            <ns1:Details>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="00:00:00" Timee="01:00:00" Amount="0.0153" Price="11.111"/>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="01:00:00" Timee="02:00:00" Amount="0.015" Price="22.222"/>
                            </ns1:Details>
                            <ns1:DSTS>
                                <ns1:Year Val="2014">
                                    <ns1:DST Period="1">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="2">
                                        <ns1:Amount>0.0222</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="3">
                                        <ns1:Amount>0.0444</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="4">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                </ns1:Year>
                            </ns1:DSTS>
                        </ns1:Deal>
                    </ns1:Package>
                </ns1:Adcs>
            </DocumentData>
        </BusinessDocument>
    </Message>') as XMLDATA from dual
    select Y.amount
    from xml_data X,
      XMLTable(  XMLNAMESPACES( 'http://automaticdealcapture/' as "ns1"),
       '/Message/BusinessDocument/DocumentData/ns1:Adcs/ns1:Package/ns1:Deal/ns1:DSTS/ns1:Year/ns1:DST'
        passing X.XMLData
      COLUMNS
        amount Number PATH '/ns1:DST/ns1:Amount'
      ) Y;
    Replace the XMLTable() with the one below to get the Amount from the Details section:
      XMLTable(  XMLNAMESPACES( 'http://automaticdealcapture/' as "ns1"),
       '/Message/BusinessDocument/DocumentData/ns1:Adcs/ns1:Package/ns1:Deal/ns1:Details/ns1:Detail'
        passing X.XMLData
      COLUMNS
        amount number PATH '/ns1:Detail/@Amount'
      ) Y;

  • How to get the node value of payload

    Hi
    The null is returned when I use the following code to get the User_ID element in the payload, but there are values in the User_ID element of the payload
    Task task_test = wfSvcClient.getTaskQueryService().getTaskDetailsById(wfCtx, taskId);
    System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getNodeValue());
    How to get the node value of payload ? any suggestion?
    Thanks
    Jayson

    Hi Jayson,
    Try:
    System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getFirstChild().getNodeValue());
    So add the getFirstChild() call in between.
    If this works, maybe consider using JAXB to marshall the payload details to POJO's. This will make reading the payload details much easier.
    Regards, Ronald

Maybe you are looking for

  • Help needed in MV Query

    Hello, I have created a MV as follows: CREATE MATERIALIZED VIEW Test1_MV BUILD IMMEDIATE REFRESH COMPLETE ENABLE QUERY REWRITE AS SELECT b.Customer_ID, j.MONTH_END_DATE, (AVG(sum(COUNT *(case when (m.DIM1_DSC ='ABC') then 1 else 0 end)))OVER (ORDER B

  • Powerbook won't see the internal hard disk drive

    I'm scratching my head with this one... Seemed to me that my HDD had died, when I booted the computer I got a grey screen. I tried using Firewire Target Disk but the other computer connected didn't see any drive pop up, and when I booted from the ins

  • Sound Blaster Wireless Rage Headset stopped working!

    So, i have just tried installing/updating the firmware and after the wireless transmitter failed then succeeded to install its firmware i decided i would also install the firmware for the headset its self but it failed and now my head set's buttons d

  • Google Calendar and Flash

    Has anyone been successful setting up Google Calendar in a Flash website? I am looking into it now but haven't come up with much. Thanks in advance...

  • How to delete Software Component Version From I.R

    Hi, Any Body tell me how can i delete Software Component Versions From Integration Repository there is no delete option showing on Right click. i already deleted dependent components thanks in advance. Thanks kiran.B