How to Read XML tags....

Hi guys...
Can any one here tell me how to read the XML tag in PL/SQL.
In table Enquiry there are following fields.
Id          number
Status          varchar2(5)
Request          XML
Reply          XML
Error          varchar2(10)
Now the following XML will be in request column from the requester.
I have to get the,
->request which is in BODY tag,
->ID number which is in from tag (its the persons unique ID to check his BILL)
Fetch the request from the database and updates it into the REPLY field with the same syntax.
<message>
<to> 123 </to>
<from>789</from>
<body> unbill </body>
<messagenumber> 01 </messagenumber>
</message>
Can any one have the solution to this, how can I read the XML tags, process & again inserts as an XML.
Thanks.

Maybe something like this will be a pointer...
SQL> CREATE TABLE t AS
  2  select 1 as id, 'C' as status, XMLTYPE('<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>') as request, XMLTYPE('<reply/>') as reply, 'NO ERROR' as error from dual
  3  ;
Table created.
SQL>
SQL> SELECT * from t;
        ID S
REQUEST
REPLY
ERROR
         1 C
<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
<reply/>
NO ERROR
SQL>
SQL> UPDATE t
  2  SET reply = updateXML(request,'/message/body/text()','bill')
  3  ;
1 row updated.
SQL>
SQL> SELECT * from t;
        ID S
REQUEST
REPLY
ERROR
         1 C
<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
<message><to>123</to><from>789</from><body>bill</body><messagenumber>01</messagenumber></message>
NO ERROR
SQL>

Similar Messages

  • How to read XML tags in a file, one at a time?

    My file format is:
    <main>
    <section>
    (many tags, some including CDATA)
    </section>
    <section>
    (many tags, some including CDATA)
    </section>
    many more <section>s (over a million)
    </main>
    To avoid reading all the <section>s into memory, how can I read one <section> at a time?
    Thanks in advance.

    sunmhe wrote:
    To avoid reading all the <section>s into memory, how can I read one <section> at a time?If you really want to process huge XML's; you can use SAX or STAX API.

  • How to read xml file and place it into an internal table...

    hello all,
    can any one help me in - how to read xml data file (placed in application server) and placing the same into an internal table (remove the xml tags or say fetching the xml data without xml tags).

    Hi Murashali,
    use this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to read xml file as shown below.

    Hello,
    I am using flash builder 4 and currently working on implementing AIR application.
    I need to read xml file data.
    Normal xml files are easy to read and i am much more aware of it.
    But can any one have idea how to read XML file which is given below.
    <node>
    <key>ID</key>
    <integer>1</integer>
    <key>Name</key>
    <string>Dhwani</string>
    <key>Postno</key>
    <integer>20</integer>
    <key>deskname</key>
    <string>flex</string>
    <key>empid</key>
    <integer>25</integer>
    <key>projectname</key>
    <string>abc</string>
    </node>
    Here i have xml file in form of key value pair. <key> node shows name of the key and after that <integer> or <string> node are the value for that specific key.
    if i select node.key then it shows me all the keys. and from that i cant make out what is the value for key ID.
    Is there any way to take first node and then second. i mean first i ll take value of key and store it into some arraycollection. and then value will be stored.
    Any help is appreciated.. Looking for positive reply.
    Thanks
    Dhwani

    There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • How to read XML file and update the data in MS CRM 2011?

    Hi Folks,
    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
    Please let me know if any ways of handling it in simple ways.
    Thanks,
    Sri

    HI,
    How to read XML file:
    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
    How to work with CRM:
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.
    More information here about service functions:
    https://msdn.microsoft.com/en-us/library/gg328198.aspx

  • How to read xml

    I'm getting xml from   customFieldsFeed.getEnumerationValues()  it is comming from  a web services looks like this
    <xml-fragment xmlns:b=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""
    xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""
    xmlns:a=""http://schemas.xxxxxxxx""
    xmlns:u=""http://docs.oasis-open.org/wss/xxxxxxx-utility-1.0.xsd""
    xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>AAAAA</a:EnumerationID>
        <a:Name>A3 MFD</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>BBBBB</a:EnumerationID>
        <a:Name>A3 Printer</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>CCCCC</a:EnumerationID>
        <a:Name>A4 MFP</a:Name>
      </b:anyType>
    </xml-fragment>"
    I need to read EnumerationID ex if AAAAA need to retrive Name value " A3 MFD"
    java 1.6
    Thanks,
    HJ

    This could be a starting point:
    http://stackoverflow.com/questions/2811001/how-to-read-xml-using-xpath-in-java
    bye
    TPD

  • How to read XML SpreadSheet using OleDb Provider

    Hi All,
    I have generated an xml spreadsheet (*.xls) using XSL. I have another program that reads this spreasheet and processes it.
    Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Dim objCon As OleDbConnection = New OleDbConnection(sConnectionString)
    objCon.Open()
    Dim objCmdSelect As OleDbCommand = New OleDbCommand("SELECT * FROM [General$]", objCon)
    Dim objAdapater As OleDbDataAdapter = New OleDbDataAdapter()
    objAdapater.SelectCommand = objCmdSelect
    Dim _DSGen As DataSet = New DataSet()
    objAdapater.Fill(_DSGen)
    I m facing an issue while opening a connection to the generated spreadsheet. It says "{"External table is not in the expected format."}".
    My Connection string is
    "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Do i need to change anything to this string ? I tried using a dataset and calling dataSet.ReadXml(excelFileName); But the dataset doesnt contain my table. Any inputs on how to read an xml spreadsheet ?
    How to read XML SpreadSheet in OleDb? How to Convert XML SpreadSheet to Microsoft Office Excel Sheet?
    Many Thanks

    Hi,
    You'lll most likely have better luck posting this in a Microsoft forum. This forum deals with issues specific to querying the Oracle database via the Oracle OLEDB provider.
    Cheers,
    Greg

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • How to read a tag of a video file

    i try to create an application that can read audio and video file with java.
    But my probleme now is that ican't read the tag of video file.
    can you help me about how to read the tag of video file like the duration of video and frame rate and the other information about the video file.Thanks

    i try to create an application that can read audio and video file with java.
    But my probleme now is that ican't read the tag of video file.
    can you help me about how to read the tag of video file like the duration of video and frame rate and the other information about the video file.Thanks

  • Problem in reading XML - tags in same line

    Hi All,
    I am using DOM to read XML , my problem is that.I can only read xml entries like folllowing- i.e when tags are in same line only... Please help.
    <src from-page="jsp/Home.jsp"><navigation-case><action>loginaction</action><from-outcome>true</from-outcome><to-page>jsp/WelcomePage.jsp</to-page></navigation-case><navigation-case><action>loginaction</action><from-outcome>false</from-outcome><to-page>jsp/Error.jsp</to-page></navigation-case>
    </src>
    I am not able to read following XML file-
    <src from-page="*">
    <navigation-case>
    <action>logoutaction</action>
    <from-outcome>true</from-outcome>
    <to-page>jsp/Home.jsp</to-page>
    </navigation-case>
    <navigation-case>
    <action>logoutction</action>
    <from-outcome>false</from-outcome>
    <to-page>jsp/Error.jsp</to-page>
    </navigation-case>
    </src>
    Thanks

    Thanks for your response.You are right I am not handling spaces anywhere. How to do that?
    Can you please help in doing this?
    I am posting my code also-
    parser.parse("C:/portal-config.xml");
    org.w3c.dom.Document doc = parser.getDocument();
    org.w3c.dom.NodeList srcList = doc.getElementsByTagName("src");
    for (int i = 0; i < srcList.getLength(); i++) {
    org.w3c.dom.Node sourceNode = srcList.item(i);
    if (sourceNode.getAttributes().getNamedItem("from-page").getNodeValue().equalsIgnoreCase(from)) {
    org.w3c.dom.NodeList navigationCaseList = sourceNode.getChildNodes();
    for (int j = 1; j < navigationCaseList.getLength(); j++) {
    org.w3c.dom.Node navigationCase = navigationCaseList.item(j);
    org.w3c.dom.NodeList childList = navigationCase.getChildNodes();
    System.out.println("node : " + navigationCase.getNodeName());
    System.out.println("list : " + childList.getLength());
    Node action = childList.item(0);
    int type = action.getNodeType();
    // case Node.ELEMENT_NODE :
    System.out.println("node : " + action.getNodeName()+ " "+ action.getNodeValue());
    org.w3c.dom.Node fromOutcome = action.getNextSibling();
    org.w3c.dom.Node toPage = fromOutcome.getNextSibling();
    System.out.println("fromOutcome : " + fromOutcome.getNodeName());
    System.out.println("toPage : " + toPage.getNodeName() + " " + toPage.getNodeType());
    if(action.getNodeType()==1 & fromOutcome.getNodeType()==1 & toPage.getNodeType()==1){
    String actionValue = action.getTextContent();
    String outValue = fromOutcome.getTextContent();
    System.out.println("actionValue : " + actionValue);
    System.out.println("outValue : " + outValue);
    if (actionValue.equalsIgnoreCase(action1) & outValue.equalsIgnoreCase(outcome)) {
    return toPage.getTextContent();
    Seeking your support
    Thanks

  • How to delete xml tags Urgent

    on release function i am inserting this value
    "(&-box*&", "&*box-&
    " in to my text box,
    in text box will display like this (squarebox), when i am
    trying to delete
    squarebox ,
    box deleting but
    (&-box*&", "&*box-&
    these xml elements are showing , what i have to
    do ? it has to delete,
    it amy have multipule box in my equation. how do delete xml
    elements in this case, this is my xml code. how to delete? any one
    can help me?

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to delete XML Tags in already tagged text?

    Hi everyone,
    I looked in all the topics but with no results.
    Is there anyone that can help me with this script?
    Thanks
    Ivan

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

Maybe you are looking for

  • Row Template for Named Report - Grouping required

    Hi, My report should show like Assigned ID Date Description To ALAN01 12345 23-JUN-07 This is the desription Entry Date :23-JUN-07 Entry Text:Pass to ABC dept Entry Date :24-JUN-07 Entry Text:Pass to DEF dept ALAN02 12346 12-JUN-07 This is the desrip

  • Show and hide events in a dashboard widget

    These two functions never seem to fire off. If the widget is hidden the hide function doesnt run and the show function only runs on the insitial load. My problem here is that i am running a setinterval to perform a task every 30 seconds while visible

  • Extending Expense Management Example in BPM Suite

    Hi All, I am a newbie for BPM Suite. I went through the expense management example.. Next, I would like to extend the example and integrate it with external resources like database and http server (apache tomcat will do). For eg, Can I store the list

  • Save workbooks in a role

    Hello Forum, I've created a simple role in BW 7.0, to which I am assigning workbooks in order to gain direct access to them from a menu of user SAP. The problem is, I am allocating 5 workbooks and on the menu only see one of them (the first assigned)

  • A518 in ECC 4.7 and A518 in ECC 6.0

    Hi, There is up-gradation in SAP from sap 4.7 to sap 6.0. The table A518 is Weighted Average charges per plant/Matl Pr. group, but when I am trying to check the same in 6.0 A518 is  Sales org./Distr. Chl/Region/PH1/PH2/PH3/PH4. How to map tables from