Read xml file using Acrobat javascript

Please let me know if a XML file can be read using Acrobat javascript.
I need to read and store the xml data in a string.
thanks,
Sashi

STEP - 2
SQL>
SQL> DECLARE
  2    l_ctx dbms_xmlsave.ctxType ;
  3    l_xml CLOB :=
  4  '<?xml version="1.0" encoding="UTF-8" ?>
  5  <NewDataSet>
  6      <ROW>
  7          <DEPARTMENT>BA52</DEPARTMENT>
  8          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
  9          <LOCATION>Australia</LOCATION>
10          <MAY_2006>21668</MAY_2006>
11      </ROW>
12      <ROW>
13          <DEPARTMENT>BA501</DEPARTMENT>
14          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
15          <LOCATION>China</LOCATION>
16          <MAY_2006>8166</MAY_2006>
17      </ROW>
18      <ROW>
19          <DEPARTMENT>BA522</DEPARTMENT>
20          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
21          <LOCATION>Australia</LOCATION>
22          <MAY_2006>21668</MAY_2006>
23      </ROW>
24  </NewDataSet>' ;
25  BEGIN
26      l_ctx := dbms_xmlsave.newContext(targetTable => 'XML_INSERT');
27      dbms_output.put_line(dbms_xmlsave.insertXML(ctxHdl => l_ctx,
28                                                  xDoc   => l_xml) ||
29                           ' rows inserted.');
30      dbms_xmlsave.closeContext(l_ctx);
31  END;
32  /
3 rows inserted.
PL/SQL procedure successfully completed.Regards.
Satyaki De.

Similar Messages

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take
    data from this file using BAPI and need to upload into SAP using SAP.
    Please tell me how to read XML files using BAPI's.

    <b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
    <b>SDIXML_DOM_TO_XML</b>  Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
    <b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
    <b>SDIXML_DOM_TO_DATA</b>
    data: it_table like t001 occurs 0.
    data: l_dom      TYPE REF TO IF_IXML_ELEMENT,
          m_document TYPE REF TO IF_IXML_DOCUMENT,
          g_ixml     TYPE REF TO IF_IXML,
          w_string   TYPE XSTRING,
          w_size     TYPE I,
          w_result   TYPE I,
          w_line     TYPE STRING,
          it_xml     TYPE DCXMLLINES,
          s_xml      like line of it_xml,
          w_rc       like sy-subrc.
    start-of-selection.
      select * from t001 into table it_table.
    end-of-selection.
    initialize iXML-Framework          ****
      write: / 'initialiazing iXML:'.
      class cl_ixml definition load.
      g_ixml = cl_ixml=>create( ).
      check not g_ixml is initial.
      write: 'ok'.
    create DOM from SAP data           ****
      write: / 'creating iXML doc:'.
      m_document = g_ixml->create_document( ).
      check not m_document is initial.
      write: 'ok'.
      write: / 'converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME               = 'IT_TABLE'
          DATAOBJECT         = it_table[]
        IMPORTING
          DATA_AS_DOM        = l_dom
        CHANGING
          DOCUMENT           = m_document
        EXCEPTIONS
          ILLEGAL_NAME       = 1
          OTHERS             = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
      check not l_dom is initial.
      write: / 'appending DOM to iXML doc:'.
      w_rc = m_document->append_child( new_child = l_dom ).
      if w_rc is initial.  write  'ok'.
      else.                write: 'Err =', w_rc.
      endif.
    visualize iXML (DOM)               ****
      write: / 'displaying DOM:'.
      CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
        EXPORTING
          DOCUMENT          = m_document
        EXCEPTIONS
          NO_DOCUMENT       = 1
          OTHERS            = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
    convert DOM to XML doc (table)     ****
      write: / 'converting DOM TO XML:'.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          DOCUMENT            = m_document
        PRETTY_PRINT        = ' '
        IMPORTING
          XML_AS_STRING       = w_string
          SIZE                = w_size
        TABLES
          XML_AS_TABLE        = it_xml
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2.
      if sy-subrc = 0.   write  'ok'.
      else.              write: 'Err =', sy-subrc.
      endif.
      write: / 'XML as string of size:', w_size, / w_string.
      describe table it_xml lines w_result.
      write: / 'XML as table of', w_result, 'lines:'..
      loop at it_xml into s_xml.
        write s_xml.
      endloop.
      write: / 'end of processing'.
    end of code
    Hope this will be useful.
    regards
    vinod

  • Reading XML file using BAPI  I must use adapters .

    Reading XML file using BAPI and then uploading that xml file data into SAP using BDC.
    I cant take file on to my Application server I am getting the file dynamically from other file server and I need to use BAPis to read data from XML file.please tell me what should be my Import,Export and Tables parameterrs should be.
    Thanks

    Hi,
    Import, export and table parameters for BAPI is required, without that BAPI will not able to collect the data from XML. What you need to do is write a Zprogram and collect the data, store that data in internal table and call the BAPI by passing required parameters.
    Different Scanarios:
    1) Before calling a BAPI write some other program which collects the data from XML and create a UNIX file. Try to get the data from UNIX FILE
    2) If you see the XML tags, data will be in side that tags, try to get the data from XML tags and store that data in one SAP table. You can use the BAPI by fetching the data from table
    3)Create a table and store the data in the table. Use the table in SAP to extract the data.
    BAPI won't work without any parameters, you have to pass some parameters then the BAPI will return some values.
    Hope i am clear.
    Thanks&Regards,
    -Suresh Revuru

  • Retrieve and Read XML Files using Oracle6i Forms

    Dear all .. i have some problem here: How can i retrieve and read a XML files using Oracle6i Forms? What should i do? Thanks - ASAP -

    Several ways - Pick up a copy of the Oracle XDK off of OTN. This provides Java and PL/SQL toolkits for dealing with XML files.
    The PL/SQL one would be in the Database, so you might have to use the Java one of you need to do it on the Forms machine.
    You can use the Java Importer in 6i to create PL/SQL wrappers that you can call from forms into the Java XDK APIs.
    Or of course you can just use the TEXT_IO package to read the XML as a text stream and parse it in your own PL/SQL code...

  • Read XML File Using PL/SQL

    Hi,
    I have to read a XML file using PL/SQL. I am new to this so please explain in easy steps.
    Regards,
    SF

    STEP - 2
    SQL>
    SQL> DECLARE
      2    l_ctx dbms_xmlsave.ctxType ;
      3    l_xml CLOB :=
      4  '<?xml version="1.0" encoding="UTF-8" ?>
      5  <NewDataSet>
      6      <ROW>
      7          <DEPARTMENT>BA52</DEPARTMENT>
      8          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
      9          <LOCATION>Australia</LOCATION>
    10          <MAY_2006>21668</MAY_2006>
    11      </ROW>
    12      <ROW>
    13          <DEPARTMENT>BA501</DEPARTMENT>
    14          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    15          <LOCATION>China</LOCATION>
    16          <MAY_2006>8166</MAY_2006>
    17      </ROW>
    18      <ROW>
    19          <DEPARTMENT>BA522</DEPARTMENT>
    20          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    21          <LOCATION>Australia</LOCATION>
    22          <MAY_2006>21668</MAY_2006>
    23      </ROW>
    24  </NewDataSet>' ;
    25  BEGIN
    26      l_ctx := dbms_xmlsave.newContext(targetTable => 'XML_INSERT');
    27      dbms_output.put_line(dbms_xmlsave.insertXML(ctxHdl => l_ctx,
    28                                                  xDoc   => l_xml) ||
    29                           ' rows inserted.');
    30      dbms_xmlsave.closeContext(l_ctx);
    31  END;
    32  /
    3 rows inserted.
    PL/SQL procedure successfully completed.Regards.
    Satyaki De.

  • I am unable to read pdf files using Acrobat Reader on my MAC OS X. Any suggestions?

    How do I read pdf files using my MAC OS X?

    You can read pdf files with preview. Select a pdf document, right click on it, and choose Preview. You can also get info and select to choose Preview for all.
    You can also install Adobe Reader 10.1.3 for Lion. It will also install a plug-in to read pdf docs in the browser.
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5360

  • How to read XML file using Automatic ref No

    I need to get the data from the xml file using Automatic reference No.I am a beginner .help me out

    Hi Parthipan,
    An easy way to get started with using XML in LabVIEW is a toolkit called EasyXML -- it's a product from JKI that I helped create
    Thanks,
    -Jim

  • Faster way to read XML files using power shell !!

    At the moment i have about 1000 XML files (ranging from size 15kb to 120kb), I have a powershell script which extracts information and writes all extracts to the same LOG file!!
    It works well but am only concerned with the time it takes!! it took about 1.5 hrs to finish the script! Is this normal?
    How can i speed it up, your inputs and thoughts helps!!
    Reading XML using the following syntax!
    $Inputfile=[xml](Get-Content $XFILE)
    Script has only foreach loop!  and no other conditions.
    cheers!

    For a small file it is about twice as fast.  It gets faster as the file size gets bigger.
    PS C:\scripts> Measure-Command {$xml=[xml](cat FooProx.xml -raw)}
    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 0
    Milliseconds : 275
    Ticks : 2758195
    TotalDays : 3.19235532407407E-06
    TotalHours : 7.66165277777778E-05
    TotalMinutes : 0.00459699166666667
    TotalSeconds : 0.2758195
    TotalMilliseconds : 275.8195
    PS C:\scripts> Measure-Command {$xml.Load("$pwd\FooProx.xml")}
    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 0
    Milliseconds : 108
    Ticks : 1081647
    TotalDays : 1.25190625E-06
    TotalHours : 3.004575E-05
    TotalMinutes : 0.001802745
    TotalSeconds : 0.1081647
    TotalMilliseconds : 108.1647
    ¯\_(ツ)_/¯

  • Cannot read a file using Acrobat SDK in Adobe Reader 11 when Enable Protected Mode is checked

    I wrote a plugin using Acrobat SDK which reads a temporary file created by another program in TEMP folder. In Adobe 10, plugin can read the temporary file and everything works. In Adobe Reader 11, plugin fails to read the temporary file when Enable Protected Mode option is checked. When I uncheck this option, everything works fine. Our customers are concerned about disabling this option. Please let me know if there is a workaround for this issue without unchecking the option. Thank you.
    -Srilatha

    Thank you! That worked!
    -Srilatha

  • Reading Xml file using File Adapter

    Hi
    I have added a file adapter to my process to read out a emp.xml from the location C:\inputDir.
    Also i have added transformation activity to map the variables.
    But the problem is iam not able read the values from emp.xml;File adpater giving me as
    empty values;
    Can someone show me a simple example?
    1.my input emp.xml
    <?xml version="1.0" encoding="windows-1252"?>
              <ns0:EmpCollection xmlns="http://TargetNamespace.com/ServiceName" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert"/>
    <ns0:Emp>
    <ns0:empno>595</ns0:empno>
    <ns0:ename>TestDAY</ns0:ename>
    <ns0:job>ANALYST</ns0:job>
    <ns0:mgr>7369</ns0:mgr>
    <hiredate>2007-11-28</ns0:hiredate>
    <ns0:sal>20000</ns0:sal>
    <ns0:comm>120</ns0:comm>
    <ns0:deptno>20</ns0:deptno>
    </ns0:Emp>
    </ns0:EmpCollection>
    2.Getting output as following empty values
    [2007/01/12 10:20:49]
    Updated variable "InvokeWrite_Write_InputVariable"
    - <InvokeWrite_Write_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmpCollection">
    - <EmpCollection xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert">
    - <ns0:Emp>
    <ns0:empno/>
    <ns0:ename/>
    <ns0:job/>
    <ns0:mgr/>
    <ns0:hiredate/>
    <ns0:sal/>
    <ns0:comm/>
    <ns0:deptno/>
    </ns0:Emp>
    </EmpCollection>
    </part>
    </InvokeWrite_Write_InputVariable
    Can someone show me a simple example?
    Thx in adv;
    ismail

    Thx for quick response;
    The following is the XML input for my BPEL process
    <?xml version="1.0" ?>
    <EmpCollection/>
    <Emp>
    <empno>595</empno>
    <ename>TestDAY</ename>
    <job>ANALYST</job>
    <mgr>7369</mgr>
    <hiredate>2007-11-28</hiredate>
    <sal>20000</sal>
    <comm>120</comm>
    <deptno>20</deptno>
    </Emp>
    </EmpCollection>
    The following is the XSd file for ReadAdpater schemafile
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/Select" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/Select" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="EmpCollection" type="EmpCollection"/>
    <xs:complexType name="EmpCollection">
    <xs:sequence>
    <xs:element name="Emp" type="Emp" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Emp">
    <xs:sequence>
    <xs:element name="empno" type="xs:int"/>
    <xs:element name="ename" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="job" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="9"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="mgr" type="xs:int" minOccurs="0" nillable="true"/>
    <xs:element name="hiredate" type="xs:dateTime" minOccurs="0" nillable="true"/>
    <xs:element name="sal" type="xs:decimal" minOccurs="0" nillable="true"/>
    <xs:element name="comm" type="xs:decimal" minOccurs="0" nillable="true"/>
    <xs:element name="deptno" type="xs:int" minOccurs="0" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="SelectSelect_enoInputParameters" type="SelectSelect_eno"/>
    <xs:complexType name="SelectSelect_eno">
    <xs:sequence>
    <xs:element name="eno" type="xs:int" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • Can't view PDF files using Acrobat Reader X

    We made many PDF files available on our Web site. In the past few weeks we noticed that users who were using Acrobat Reader X and Internet Explorer 8 or 9 were not able to view some PDF files. Basically, when they clicked a link to display a PDF file, the screen would be cleared and the status bar showing "Loading ...KB/...K/B" would be displayed. The status bar would move a bit and then got stuck. The PDF file would never be displayed. Sometimes, my users could click the Back button to go back the previous Web page and sometimes they had to close or kill the IE window. Small PDF files seemed to be fine. I was able to repeat this problem on PCs running Windows XP and Windows 7. I also tested clicking the same PDF files with PCs installed with Acrobat Reader 9 and I was not able to cause the problem to occur, so I am pretty sure that this problem is related to Acrobat Reader X. I also noticed that if I unchecked the "Display PDF in browser"  option in Acrobat Reader X so that PDF files would not be displayed inside the Internet Explorer window, I would be able to view all PDF files without any problems.
    I also did an experiment by resaving many PDF files using Acrobat Pro (Reduce File Size...) to be compatible with Acrobat 8 or above. I was able to open these PDF files using Acrobat Reader X but when I used a PC with Acrobat 9, it would get stuck instead. Most of my PDF files were created a long time ago and we usually made it compatible with Acrobat 5 or above.
    I saw that some people reported some problems with Acrobat Reader X but I did not see a solution except uninstalling Acrobat Reader X and installing an old version of Acrobat Reader instead. Anyone has any ideas why this is happening and how to fix this problem?
    RJ

    Sounds like you got the trial of Acrobat. Go to add/remove programs, get rid of it, the download the free Reader from http://get.adobe.com/reader/

  • Problem reopening and/or refreshing PDF files using Acrobat Reader V. 8.0

    I upgraded to Adobe Acrobat Reader V. 8.0 and have encountered problems refreshing PDF files in the Safari 2.0.4 browser when I am logged into the secure area for Value Line Publishing. Some of the PDF Files in this area can be opened and/or refreshed multiple times. Other PDF files in this area allow me to open them once. I cannot reopen those previously viewed files (or refresh the screen) -- after refreshing, the window changes to a blank white screen, and the files do not reopen.
    I am perplexed because I do not have difficulty refreshing the PDF files (within Safari) using the native PDF viewer, I did not have problems refreshing files using Acrobat Reader V. 7.0 and I do not appear to have problems refreshing PDF files using Acrobat Reader V. 8.0 when I am outside the secure area or on other web sites.
    I have replaced the Acrobat Reader plug-in, manually removed all remnants of previous versions of Acrobat Reader and reinstalled V. 8.0. and I also upgraded from Mac OS 10.4.8 to 10.4 9, all to no avail.
    I can clear the Safari cache files as a temporary solution, but I encounter the same difficulties with the “problematic” files once they have been opened again.
    I can also download the PDF files to my hard drive and refresh them multiple times within Safari and also using Acrobat Reader V. 8.0
    The software personnel at Value Line Publishing have investigated their system and have referred me back to Apple. Has anyone heard of similar problems associated with Adobe Acrobat Reader V. 8.0 used in conjunction with Safari 2.0.4?
    PowerBook G4   Mac OS X (10.3.9)  

    Hi Rodney
    Welcome to Apple Discussions
    This sounds like one of those "oddities", contributed to by a few sources.
    I can clear the Safari cache files as a temporary solution, but I encounter the same difficulties with the “problematic” files once they have been opened again.
    Wondering if you disabled the Safari Cache would the refresh function work correctly? As a test you can disable the Safari Cache by Emptying the Cache first via the Safari menu, then Quit Safari. Now go to the Finder>Your User Library>Caches>Safari. Single click on the Safari folder, then Apple Key + I to open Info panel. There, check the "locked" box. This prevents further additions to the cache. The downside, you lose your ability to upload images etc. within Safari (my cache is disabled, so I use Firefox for the uploads).
    Then restart Safari. Try the PDF from within Safari.
    Post back

  • How to read a text file using adobe javascript

    Hi,
    I have a api application which adds toolbar to a adobe acrobat. i need to disable the toolbar according to expiry date, So i need to fetch the expiry datge from a text file from the specified location.
    I am using importTextData() function to get the textdata from text file using adobe javascript. When i call this function i am getting error "ReferenceError: importTextData() is not defined".
    I am using Adobe Acrobat 7.0 version.
    Can any one tell how to use the importTextData() function.
    Regards
    Shiva

    calling from javascript file which is placed in the below location.C:\\Program Files (x86)\\Adobe\\Acrobat 7.0\\Acrobat\\Javascripts
    Regards
    Shiva

Maybe you are looking for

  • Trouble with e-mail

    I've noticed that I'm having trouble with my .mac/.me account in that I can't seem to send messages anymore. We haven't changed service providers or modems or routers...and it's a problem on the imac and the ibook (4 year differential in age). I've c

  • JSF Rendering messages component

    Hi All, I am having a t:messages tag on my jsf page which displayes all the error messages I want to make it fixed size possible by placing it in a textarea, Can i do this ? There is an attribute layout to t:messages tag which supports table and list

  • A1000 low memory crashes

    IdeaTabA1000L-F, android 4.1.2, kernal 3.4.0, serial HGC1W5PYMany months ago i came on this site looking for a solution about my low memory problems, d/l a updated software fix for this which lasted a whole day. Installed an external sd card and move

  • How can I conditionally change text output?

    Trying to modify text output, inline, based on a True|False condition i.e.: "the condition is: <condition>" should become "the condition is: Yup" or "the condition is: Badboy" I'm trying to use some inline code.  for example: "{if ($condition) {"Yup"

  • BI content import issue

    Dear All, I've completed the installation for the below: SAP NW2004s SR3 on DB2 However, I have some issue when I executed SAINT to import the BI content. The errors is as below: The Add-on installation terminated during phase OBJECTS_LOCKED_? From S