Error reading XML file in URL

On my application I need to take the parameters from a configuration �object� at a XML file outside the Jar file. Executing an applet and through the appletviewer I can read the file if it is on the same folder. When executing from a browser I can not locate the file.
I have created a class with the code:
        URL codeBase = this.getCodeBase();
        URL url = null;
        try {
            url = new URL(codeBase, "filename.xml");
     .........When I execute the code above the following error appears: java.applet.Applet.getCodeBase(Unknown Source).

You want to display it or work with the content of the XML File?
For displaying you do not need a jsp to do that the link to the *.xml will be enough.
Otherwise you need to parse it, either with a SAX or DOM Parser. Look for dom4j, it is easier for the start as I think.
Regards
Tarik

Similar Messages

  • Error Reading xml file

    hello guys , i made a java program using jni to call a Com file , this com file will return an xml string , i am supposed to read that xml string and parse it
    i made my code like the following
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              Document currentdocument = builder.parse(new File("simple2.txt"));
              //normalize the string representation
              currentdocument.getDocumentElement().normalize();
              String RootName = currentdocument.getElementById("IdValue").getNodeValue();
              jTextArea1.append(RootName);
    now trying to parse that it gives me an enormous error which is
    Invalid byte 1 of 1-byte UTF-8 sequence.
    what is the problem

    Using my crystal ball, it seems as if the .txt file created by the Com file is not UTF8 as you have specified or let default.

  • Error while posting xml file to URL using URLConnection

    Hello everyone,
    I am facing an issue from long time related to URLConnection. If this would be resolved by your help then I would be very grateful to you.
    One application which posts xml file to URL hangs and after waiting for 5 mins it throws 504 error:
    java.io.IOException: Server returned HTTP response code: 504 for URL: http:hostname.
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:715)
    Same application is running fine without error on another environment from last 5 years. But on another env it is erroring out from the day 1.
    We have many workarounds in place none worked.
    I tried to use HttpClient from apache but that too hanged at URLConnection.getInputStream() method call.
    App is running on iPlanet web server 6.1 using JDK 1.4.0_03
    We still dont know why this program hangs at that particular line in only one env but many times it runs fine. That means 30% of the times it posts xml file without error but 70% times it errors out. So our program logic is to retry until post is successful.
    Once this issue is resolved we will remove the logic of trying again and agian.
    Please provide inputs.
    Thanks,
    Nitin

    The HTTP response 504 means that the server, acting as a gateway, has not received a response from an upstream server in the time it expected.
    I think this is problem is due to the remote server that receives the XML and takes too long to return a response to the local application that posted the XML.
    Try HttpClient and set the timeout variable of the HttpClient instance used.
    Here http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/examples/PostXML.java?revision=480424&view=markup
    a Post XML sample.
    NB: HttpClient > setTimeout method is deprecated. See : http://jakarta.apache.org/commons/httpclient/apidocs/index.html for an alternative
    Hope That Helps

  • How to read XML file kept on NON-SAP server using the Http URL ?

    Dear Experts,
    I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
    All i have with me is the http URL that points to the location of the file.
    I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
    I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
    I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
    Please help me as its an urgent issue .
    Points will be rewarded for sure.
    Please help.
    Thanks in advance,
    Suchita.
    p.s. : the http url to the file location is like -->
    http://SomeServerDomain/SomeDirectory/file.xml

    hi,
    interesting task.
    to request the file by a http call you need to create an if_http_client object.
    More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
    to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
    uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
    now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
    have fun,
    anton

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
    1) while installing the rpm packages the following package gave an error
    Error reading from file glibc-2.5-24.i686.rpm
    2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
    I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
    http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
    What could be the problem where do I find the error log if its created
    Please help me
    Thanks
    Edited by: 891355 on Nov 6, 2011 12:06 PM

    I found the installActions file in the installer folder and I think this could be the problem
    INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
    though I am attaching the log file for more details do you think the installer is corrupt :(
    InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
    Edited by: 891355 on Nov 6, 2011 1:35 PM

  • Error reading wsdl file excepetion null

    Hi
    I am trying to invoke a proxy service (web service) wsdl from a bpel process. When i add a web service adapter, put url of external web service and save it, all my service end points defined in the BPEL process are becoming non editable. Binding of operation is changing from web service to HTTP binding for all end points. When I try to edit any partner link, Jdev throws an error " error reading wsdl file excepetion null " for local services. For external service, even though i am refering to a url on the server, it points to " C:\Oracle\Middleware\jdeveloper\jdev\bin\...\xxxx?WSDL" and throws same error " failed to read wsdl file(System could not find the path specified". I am just clueless as to why this is happening. Any help is much appreciated.

    Try the SOA Forum - SOA Suite

  • Error reading project file : no protocol

    I have followed the instructions exactly as in the j2ee tutiorial ,but, when I run asant , an error occurs:
    : Error reading project file : no protocol: ../../common/targets.xml
    Urgent!

    Could you please provide a bit more detail such as which sample you are using? Also are you using the latest version of the tutorial and have you configured your build.properties in the samples/common directory?

  • Error reading configuration file

    I've setup the Adobe Access 4.0 trial license server and when I run the Validator.bat with -g -r on the Tomcat install dir \licenseserver I get an 'Error reading configuration file' message. Here is the log dump:
    [] 2012-12-20 22:46:32,176 INFO  [[Partition(flashaccessserver)].com.adobe.flashaccess.server.license.context.SimpleContex tFactory] Creating class loader for partition 'flashaccessserver' with libraries '[file:/c:/Tomcat6/licenseserver/flashaccessserver/libs/, file:/c:/Tomcat6/licenseserver/flashaccessserver/libs/flashaccess-license-server-ext-samp le.jar]'
    [] 2012-12-20 22:46:32,582 ERROR [[Partition(flashaccessserver)].com.adobe.flashaccess.server.license.tools.Validator] Failed to validate tenant deployment 'flashaccessserver/sampletenant'
    com.adobe.flashaccess.server.common.configuration.ConfigurationException: Error reading configuration file
              at com.adobe.flashaccess.server.license.configuration.commonsadapter.Constants.parseTenantCo nfigurationStream(Constants.java:139)
              at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl .<init>(TenantConfigurationImpl.java:110)
              at com.adobe.flashaccess.server.license.configuration.commonsadapter.CommonsConfigurationBas edFactory.getTenantConfiguration(CommonsConfigurationBasedFactory.java:90)
              at com.adobe.flashaccess.server.license.tools.Validator.validateTenantDeployment(Validator.j ava:255)
              at com.adobe.flashaccess.server.license.tools.Validator.validatePartitionDeployment(Validato r.java:283)
              at com.adobe.flashaccess.server.license.tools.Validator.validateGlobalDeployment(Validator.j ava:301)
              at com.adobe.flashaccess.server.license.tools.Validator.process(Validator.java:173)
              at com.adobe.flashaccess.server.license.tools.Validator.main(Validator.java:117)
    Caused by: org.apache.commons.configuration.ConfigurationException: Unable to load the configuration
              at org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguration.java:863)
              at org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguration.java:821)
              at com.adobe.flashaccess.server.license.configuration.commonsadapter.Constants.parseTenantCo nfigurationStream(Constants.java:134)
              ... 7 more
    Caused by: org.xml.sax.SAXParseException; lineNumber: 121; columnNumber: 16; cvc-complex-type.2.4.b: The content of element 'KeyServer' is not complete. One of '{"http://licenseserver.flashaccess.adobe.com/tenant":File}' is expected.
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unkno wn Source)
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportErro r(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexT ype(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unk nown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(Unkno wn Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unk nown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDri ver.next(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
              at org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguration.java:855)
              ... 9 more
    I'm using a relative path to my .pfx file for both the transportServerCredential and licenseServerCredential in the flashaccess-tenant.xml and my password has been scrambled using the Scrambler.bat.
    Also, when I verify setup using http://<LicenseServer>:8080/flashaccessserver/flashaccess/license/v2 I get the message 'License server is setup correctly.'
    Any ideas of why the Validator.bat can't read the configuration file?

    I agree with you that if I can successfully playback content the license serve is setup successfully. Here is what I've tried and how I've set things up:
    I have my license server setup (its the Protected Streaming version).
    I'm using Adobe Media Server as my content/packaging server. I successfully served Vanilla PHLS sample streams to the sample Adobe Access player on iOS devices.
    I have configured the Adobe Media Server to point to the license server and certificates as per the documenation and this Adobe Dev article (http://www.adobe.com/devnet/adobe-media-server/articles/content-protection-using-phds-phls .html). Since I am using a trial version of Adobe Access my .der files are the same for transport and packaging.
    I am using the local key mode to remove one more variable (I have setup a remote key server as well).
    I have placed a copy of the 'vod-policy.pol' policy file from the reference license server resources directory in my Adobe Media Server 'creds' directory and used the relative path '..creds/vod-policy.pol' in the httpd.conf file.
    When I attempt to load the sample stream http://<mymediaserver>/hls-vod/sample2_1000kbps.f4v.m3u8 using the Adobe Access sample player on my iOS device I receive the following errors in the player:
    DRM error Major[3363] minor:[0] NSError:(null)]
    From my knowledge of working with the Adobe Access Objective C library to create a PhoneGap plugin it appears that a decrypted playlist is not being returned by the Adobe Media Server. Additionally, I can find no information in the Adobe Media Server or Adobe Access logs that pertain to my setup.
    I would love to have someone from Adobe speak to the problems I am having. I find the documentation to be hit and miss and most of my successful results during this proofing process have been from piecing together disparate pieces of information and trial and error. Information on using the Adobe Media Server with Adobe Access is limited to one Devnet article (above) and the help in Adobe Media Server that doesn't explain pathing to the license server or Java policy files in any detail.
    Colour me frustrated

  • Failed to read wsdl file from url

    Hi all,
    I am struggling with WL 9.2, consuming a WSRP enabled portlet at the following point:
    Having created a proxy portlet, refering to the WSDL of the WSRP producer, I did successfully deploy the portal. When accessing the portal and consuming the portlet the following exception is thrown:
    com.bea.wsrp.faults.TransportException: Failed to read wsdl file from url due to -- java.net.ConnectException: Tried all: '8' addresses, but could not connect over HTTP to server: 'www.w3.org', port: '80';
    The WSDL includes a schema (http://www.w3.org/2001/XMLSchema). The URL is definetely accessible by the server.
    I am open for any kind of support ;) Thanks in advance!
    Kind regards,
    Matthias

    Yes, they are all local schemas. The way ALSB works, even if the import path in the wsdl or parent schema doesn't exist, relative to the current directory, you can specify which schema resolves that reference. My WSDL imports several schemas, all of which import others. When I was done importing all the schemas and resolving references, all the references in WSDLs and XSDs were assigned and valid. However, after all of those imports and reference resolution, it still says the WSDL is invalid, with the following odd error message:
    The WSDL is not semantically valid: Failed to read wsdl file from url due to -- java.net.MalformedURLException: no protocol: /XMLSchema/PaymentServices/Resources/PaymentServices-200802.
    That path listed refers to one of the schemas imported by the WSDL. The reference to that schema in the WSDL was resolved, and it doesn't complain about that reference.

  • Problem  while reading XML file from Aplication server(Al11)

    Hi Experts
    I am facing a problem while  reading XML file from Aplication server  using open data set.
    OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
    IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      READ DATASET v_dsn INTO v_rec.
    WHILE sy-subrc <> 0.
      ENDWHILE.
      CLOSE DATASET v_dsn.
    The XML file contains the details from an IDOC number  ,  the expected output  is XML file giving  all the segments details in a single page and send the user in lotus note as an attachment, But in the  present  output  after opening the attachment  i am getting a single XML file  which contains most of the segments ,but in the bottom part it is giving  the below error .
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    for all the xml  its giving the error in bottom part ,  but once we open the source code and  if we saved  in system without changing anything the file giving the xml file without any error in that .
    could any one can help to solve this issue .

    Hi Oliver
    Thanx for your reply.
    see the latest output
    - <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    E1EDT13 with QUALF>003 and  <E1EDT13 SEGMENT="1">
    with   <QUALF>001 having almost same segment data . but  E1EDT13 with QUALF>003  is populating all segment data
    properly ,but E1EDT13 with QUALF>001  is giving in between.

  • UCCX Reading XML file hosted on IIS web server

    hi guys,
    i have a customer on CCX 8.5 environment and they have a .NET application running on an IIS web server. As part of this .NET application, the app produce an XML file.
    My questions is
    "Can CCX read XML file that is hosted externally on IIS web server rather than parsing the XML file on CCX document repository?"
    All of the examples of XML parsing points to the XML file in document repository.
    Any pointers to links and documentation/example on how to do this would be greatly appreciated.
    If this is not achievable, if you could kindly suggest a different way of doing it too would be greatly appreciated.
    Thanks in advance,
    Daniel

    Hi,
    to be quite honest with you, I don't know anything about Sharepoint - so I am afraid I cannot help you with its XML editing capabilities. XML is just a well formed text file that follows some logical rules, so no additional application is required for editing, in fact, I always encourage everybody to use Notepad/Textpad/ to read and edit XML files. Of course, if it's not possible, you will find a great number of various user friendly XML editing applications.
    A UCCX script will normally access an XML using the Create URL Document step and then, using the Get XML Document data step with the help of an XPath expression, will filter out the necessary information from the XML document.
    The protocols used are standard and well known, including HTTP and XPath (and XML itself). So it does not really matter what kind of HTTP server serves the XML file, IIS is just an option.
    Examples may be found in the Scripting guides for your particular UCCX version.
    HTH
    G.

  • Load and Read XML file size more than 4GB

    Hi All
    My environment is Oracle 10.2.0.4 on Solaris and I have processes to work with XML file as below detail by PL/SQL
    1. I read XML file over HTTP port into XMLTYPE column in table.
    2. I read value no.1 from table and extract to insert into another table
    On test db, everything is work but I got below error when I use production XML file
         ORA-31186: Document contains too many nodes
    Current XML size about 100MB but the procedure must support XML file size more than 4GB in the future.
    Belows are some part of my code for your info.
    1. Read XML by line into variable and insert into table
    LOOP
    UTL_HTTP.read_text(http_resp, v_resptext, 32767);
    DBMS_LOB.writeappend (v_clob, LENGTH(v_resptext), v_resptext);
        END LOOP;
        INSERT INTO XMLTAB VALUES (XMLTYPE(v_clob));
    2. Read cell value from XML column and extract to insert into another table
    DECLARE
    CURSOR c_xml IS
    (SELECT  trim(y.cvalue)
    FROM XMLTAB xt,
    XMLTable('/Table/Rows/Cells/Cell' PASSING xt.XMLDoc
    COLUMNS
    cvalue
    VARCHAR(50)
    PATH '/') y;
        BEGIN
    OPEN c_xml;
    FETCH c_xml INTO v_TempValue;
    <Generate insert statement into another table>
    EXIT WHEN c_xml%NOTFOUND;
    CLOSE c_xml;
        END
    And one more problem is performance issue when XML file is big, first step to load XML content to XMLTYPE column slowly.
    Could you please suggest any solution to read large XML file and improve performance?
    Thank you in advance.
    Hiko      

    See Mark Drake's (Product Manager Oracle XMLDB, Oracle US) response in this old post: ORA-31167: 64k size limit for XML node
    The "in a future release" reference, means that this boundary 64K / node issue, was lifted in 11g and onwards...
    So first of all, if not only due to performance improvements, I would strongly suggest to upgrade to a database version which is supported by Oracle, see My Oracle Support... In short Oracle 10.2.x was in extended support up to summer 2013, if I am not mistaken and is currently not supported anymore...
    If you are able to able to upgrade, please use the much, much more performing XMLType Securefile Binary XML storage option, instead of the XMLType (Basicfile) CLOB storage option.
    HTH

  • How to read XML data from URL

    Hi All,
    I have one requirement. I have one URL which gives me data in XML format. I need to read this file and store this data into my SAP tables.
    Can anybody suggest how read this XML file using URL?
    Thanks in advance,
    P.Shridhar.

    Use a Server java proxy generated from your inbound message interface which would make a URLConnection to the specified URL after it gets triggered by BPM. A code snippet to achieve the same could be
    URL url  = null;
    URLConnection conn = null;
    BufferedReader in = null;
    url = new URL("http://someurl.someserver.com");
    conn = url.openConnection();
    in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    String line = null;
    StringBuffer xml = new StringBuffer();
    while ((line = in.readLine()) != null){
            xml.append(line);
    -- amol

  • Read XML file into stored procedure

    hi to all, i have this stored procedure :
    create or replace
    PROCEDURE INSERTXML(
                                          p_xml_in CLOB,
                                          p_table IN VARCHAR2 ) AS                                     
      insCtx DBMS_XMLStore.ctxType;
      v_rows NUMBER;
    BEGIN
      insCtx := DBMS_XMLStore.newContext(p_table); -- get saved context
      dbms_xmlstore.setRowTag(insCtx,'Row');
      DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings
      -- set the columns to be updated as a list of values
      DBMS_XMLStore.setUpdateColumn(insCtx,'ORDERNUMBER');
      DBMS_XMLStore.setUpdateColumn(insCtx,'PLANT');
      DBMS_XMLStore.setUpdateColumn(insCtx,'MATERIAL');
      DBMS_XMLStore.setUpdateColumn(insCtx,'LINENUMBER');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'NOMSPEED');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'STARTDATE');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'FINISHDATE');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'TARGETQTY');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'UNIT');
      DBMS_XMLStore.setUpdatecolumn(insCtx,'SYSTEMSTATUS');
      v_rows := DBMS_XMLStore.insertXML(insCtx, p_xml_in);
      -- Close the context
      DBMS_XMLStore.closeContext(insCtx);
    END;
    that passes xml file and puts in table but SAP Mii have the limitation that the maximun value of strings is 4000..how can i pass this limitation?!?! someone have some ideia?!?!...i have now to read XML file to stored procedure...could someone help me??
    regards and thanks in advance

    hello Michael thanks for your help but appear to me some strange errors, i created this package in Oracle SQL Developer...
    create or replace PACKAGE PACKAGE_XML AS
      type return_cur IS ref CURSOR;
      procedure INSERTXML4(
        xmlDoc IN CLOB,
        tableName IN VARCHAR2,
        myRC IN OUT return_cur
    END PACKAGE_XML;
    and compile and everthing is ok, then i changed my SP and it looks like this:
    create or replace PROCEDURE INSERTXML4
      (xmlDoc in CLOB, tableName in VARCHAR2, refcur in out package_xml.return_cur)
    AS
      insCtx dbms_xmlsave.ctxType;
      rowcnt number;
    BEGIN
      insCtx := dbms_xmlsave.newContext(tableName);
      dbms_xmlsave.setignorecase(insCtx,1);
      rowcnt := dbms_xmlsave.insertxml(insCtx, xmlDoc);
      dbms_xmlsave.closecontext(insCtx);
      OPEN refcur FOR SELECT rowcnt AS cnt FROM dual;
    END INSERTXML4;
    but i cant compile...it throws this errors:
    Error(5,10): PLS-00201: identifier 'DBMS_XMLSAVE.CTXTYPE' must be declared
            Error(5,10): PL/SQL: Item ignored
            Error(8,3): PLS-00320: the declaration of the type of this expression is incomplete or malformed
            Error(8,3): PL/SQL: Statement ignored
            Error(9,3): PL/SQL: Statement ignored
            Error(9,30): PLS-00320: the declaration of the type of this expression is incomplete or malformed
            Error(10,3): PL/SQL: Statement ignored
            Error(10,13): PLS-00201: identifier 'DBMS_XMLSAVE.INSERTXML' must be declared
            Error(11,3): PL/SQL: Statement ignored
            Error(11,29): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    do you could help..
    regards
    Mário

  • Read xml File with counter

    I have a question, but I posted it on the wrong forum. This is the link:
    https://social.msdn.microsoft.com/Forums/en-US/899c8291-70f5-4c1b-abf2-a1a1242e017a/read-xml-file-with-counter?forum=visualstudiogeneral&prof=required

    Hi,
    I have created a program that read an xml file like this:
    <xas>
    <information>
    <list>"12345"</list>
    <version>1.0.0.1</version>
    </information>
    <word><n>0</n><v>test123v</v><a>test123a</a></word>
    <word><n>1</n><v>testv</v><a>testa</a></word>
    </xas>
    I read it to a listview called listview1:
    The MainWindow.xaml:
    <Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="" Height="1220" Width="1017" WindowStartupLocation="Manual" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.CanContentScroll="True" UseLayoutRounding="False" WindowState="Maximized">
    <Grid>
    <ListView x:Name="ListView1" HorizontalAlignment="Left" Height="1220" VerticalAlignment="Top" Width="1017">
    <ListView.View>
    <GridView x:Name="Lijst">
    <GridViewColumn x:Name="Vraag" Header="Vraag" DisplayMemberBinding="{Binding Vraag}">
    </GridViewColumn>
    <GridViewColumn x:Name="Antwoord" Header="Antwoord" DisplayMemberBinding="{Binding Antwoord}">
    </GridViewColumn>
    </GridView>
    </ListView.View>
    </ListView>
    </Grid>
    </Window>
    And this is MainWindow.xaml.vb:
    Imports System.IO
    Imports System.Reflection.Assembly
    Imports System.Xml
    Imports System.Data
    Class MainWindow
    Dim VraagListBox As New ListBox
    Dim AntwoordListBox As New ListBox
    Dim Hoofdmap As String = GetExecutingAssembly().Location
    Dim Bestand As String
    Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
    'RUNNEN MAAR!!!!
    'Het bestand vinden in de commandline argumenten
    Dim args() As String = System.Environment.GetCommandLineArgs()
    Dim Teller As Integer = "0"
    For Each arg As String In args
    If Teller = "1" Then
    Bestand = arg
    Else
    Teller = Teller + "1"
    End If
    Next
    Bestand = "D:\Alles voor school!\Alles voor school!\Vakken\Stepping Stones\DATA1\Hoofdstuk 1\Leerlijsten\Hoofdstuk 1 Grammer 1.xas"
    'Welk bestand? Set de title
    Me.Title = Path.GetFileName(Bestand) & " - ListViewer (V.1.0.0.6)"
    If Bestand <> "" Then
    'Vragen en antwoorden toevoegen in de kolommen
    If Path.GetExtension(Bestand) = ".xas" Then
    Dim orderInfo = XElement.Load(Bestand)
    For Each entry As XElement In orderInfo...<word>
    Dim thisOrder As New Order
    With thisOrder
    .Vraag = entry...<v>.Value
    .Antwoord = entry...<a>.Value
    End With
    ListView1.Items.Add(thisOrder)
    Next
    'Virtuele vraaglistbox toevoegen = kolom Vraag van LisView1
    Dim orderInfoVraag = XElement.Load(Bestand)
    For Each entry As XElement In orderInfoVraag...<word>
    Dim thisOrderVraag As New VraagClass
    With thisOrderVraag
    .Vraag = entry...<v>.Value
    End With
    VraagListBox.Items.Add(thisOrderVraag)
    Next
    'Virtuele antwoordlistbox toevoegen = kolom Antwoord van LisView1
    Dim orderInfoAntwoord = XElement.Load(Bestand)
    For Each entry As XElement In orderInfoAntwoord...<word>
    Dim thisOrderAntwoord As New AntwoordClass
    With thisOrderAntwoord
    .Antwoord = entry...<a>.Value
    End With
    AntwoordListBox.Items.Add(thisOrderAntwoord)
    Next
    'Check wat er fout is aan het bestand, en geef een melding
    Else
    MessageBox.Show("Er is een verkeerde extentie geselecteerd, namelijk: " & Path.GetExtension(Bestand) & ".", "Verkeerde extentie - ListViewer", MessageBoxButton.OK, MessageBoxImage.Error)
    Me.Close()
    End If
    Else
    If Bestand = "" Then
    MessageBox.Show("Je hebt geen bestand geselecteerd", "Geen bestand geselecteerd - ListViewer", MessageBoxButton.OK, MessageBoxImage.Error)
    Me.Close()
    Else
    MessageBox.Show("Er is iets misgegaan met het laden van het bestand, probeer het later opnieuw", "Onbekende error - ListViewer", MessageBoxButton.OK, MessageBoxImage.Error)
    Me.Close()
    End If
    End If
    End Sub
    Private Sub ListView1_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles ListView1.MouseDoubleClick
    Directory.CreateDirectory(Path.GetTempPath & "110% Soft\ListViewer 1.0.0.6\" & Path.GetFileName(Bestand))
    Dim SchrijfVraag As New StreamWriter(Path.GetTempPath & "110% Soft\ListViewer 1.0.0.6\Word.txt")
    Dim SchrijfFile As New StreamWriter(Path.GetTempPath & "110% Soft\ListViewer 1.0.0.6\File.txt")
    SchrijfVraag.WriteLine(ListView1.SelectedIndex)
    SchrijfFile.WriteLine(Bestand)
    SchrijfVraag.Close()
    SchrijfFile.Close()
    Dim WoordenScherm As ViewWord
    WoordenScherm = New ViewWord()
    WoordenScherm.ShowDialog()
    End Sub
    End Class
    ViewWord.xaml is:
    <Window x:Class="ViewWord"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ViewWord" Height="155" Width="1017" ResizeMode="NoResize" SizeToContent="WidthAndHeight" Topmost="True" WindowStartupLocation="CenterScreen">
    <Grid>
    <Label x:Name="VraagLabel" Content="Vraag:" HorizontalAlignment="Left" Margin="23,11,0,0" VerticalAlignment="Top" Width="106"/>
    <TextBox x:Name="VraagTextBox" HorizontalAlignment="Left" Height="24" Margin="134,13,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="743" />
    <Label x:Name="AntwoordLabel" Content="Antwoord:" HorizontalAlignment="Left" Margin="23,42,0,0" VerticalAlignment="Top" Width="106"/>
    <TextBox x:Name="AntwoordTextBox" HorizontalAlignment="Left" Height="24" Margin="134,44,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="743"/>
    <Button x:Name="VraagAanpassenButton" Content="Aanpassen" HorizontalAlignment="Left" Margin="882,15,0,0" VerticalAlignment="Top" Width="107"/>
    <Button x:Name="AntwoordAanpassenButton" Content="Aanpassen" HorizontalAlignment="Left" Margin="882,44,0,0" VerticalAlignment="Top" Width="107"/>
    <Label x:Name="VraagNummerLabel" Content="Vraagnummer:" HorizontalAlignment="Left" Margin="23,72,0,0" VerticalAlignment="Top" Width="106"/>
    <TextBox x:Name="VraagNummerTextBox" HorizontalAlignment="Left" Height="24" Margin="134,74,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="743"/>
    <Button x:Name="VraagNummerAanpassenButton" Content="Aanpassen" HorizontalAlignment="Left" Margin="882,74,0,0" VerticalAlignment="Top" Width="107"/>
    </Grid>
    </Window>
    In VraagTextBox must come the entry <word><v>test123v</v></word>, in AntwoordTextBox must come the entry <word><a>test123a</a></word>, and in VraagNummerTextBox must come the entry <word><n>0</n></word>
    This is the code to fix that (ViewWord.xaml.vb):
    Imports System.IO
    Public Class ViewWord
    Private Structure AntwoordVraag
    Public Vraag As String
    Public Antwoord As String
    End Structure
    Private Sub ViewWord_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
    End Sub
    Private Sub AntwoordAanpassenButton_Click(sender As Object, e As RoutedEventArgs) Handles AntwoordAanpassenButton.Click
    Dim Vraagnummer As String
    Dim Bestandsnaam As String
    Dim LeesVraag As New StreamReader(Path.GetTempPath & "110% Soft\ListViewer 1.0.0.6\Word.txt")
    Dim LeesFile As New StreamReader(Path.GetTempPath & "110% Soft\ListViewer 1.0.0.6\File.txt")
    Vraagnummer = LeesVraag.ReadLine()
    Bestandsnaam = LeesFile.ReadLine()
    LeesVraag.Close()
    LeesFile.Close()
    MessageBox.Show(Vraagnummer)
    Dim teller As Integer = 0
    Dim orderInfo = XElement.Load(Bestandsnaam)
    If teller = Vraagnummer Then
    VraagNummerTextBox.Text = orderInfo...<word>...<n>.Value
    VraagTextBox.Text = orderInfo...<word>...<v>.Value
    AntwoordTextBox.Text = orderInfo...<word>...<a>.Value
    Else
    teller = teller + 1
    End If
    End Sub
    End Class
    But the result isn't:
    VraagTextBox.Text = testv
    AntwoordTextBox.Text = testa
    NummerTextBox.Text = 1 
    if i click on the number 2 of the listview (index = 1)
    How can i fix it?

Maybe you are looking for

  • When I click on App Store icon, screen goes blank.  Any ideas?

    Badge on App Store icon says I have one app to update, so click on the icon, and screen is completely blank white.  Info bar at top is visible, as well as a solid gray bar below that info bar, but white from there to bottom of screen.  No activity at

  • UPDATE field in internal table?

    Hi, I have an internal table with XXXXXXXX records. I have to UPDATE 1 field with the same value. Is there a faster way?     LOOP AT lt_order_adm_h INTO wa_order_adm_h.       wa_order_adm_h-process_type = 'Z002'.       MODIFY lt_order_adm_h FROM wa_o

  • To display output adjacent to each other

    Hi, I'm trying to display the following pattern 1 1 2 1 2 3 but when i tried something like this: declare i number; j number; begin for i in 1..3 loop for j in 1..i loop dbms_output.put_line(j); end loop; end loop ; end; i'm getting the output like t

  • Web Analysis Save As HTML feature

    Hi,<BR><BR>I'm wondering if anybody has any experience saving Web Analysis report as HTML. I've managed to do so and it produced an HTML file with a folder containing the supporting files. However, when playing with the control on the exported HTML r

  • Oswald font changes every time I export PDF

    Hi, Every time I export to PDF I get a totally different font. The font I'm using is Oswald. I thought Pages was supposed to embed fonts automatically? It doesn't matter if I export to PDF or go to Print and Save as PDF. In both cases it changes the