Read xml from url

Hi all

I'm trying to get the data from this particular url: http://api.openweathermap.org/data/2.5/weather?q=London&mode=xml

I have no problem to scan directly from a .xml or xml string. But I can't read the data directly from labview or even save the file in the url as a .xml.

I already looked for example as reading and other http Web site, but has failed to adapt to my url.

If someone of you can help me

Thank you

The two of them seem to work here in LV 2011 very well:

Note that the other will require adding support for Datasocket if you build an installer and that the client HTTP screws have been added only around 2011.

Tags: NI Software

Similar Questions

  • PowerCli: Read from URL

    Hello

    Is it possible to allow PowerCLI read directly from the URL, instead of say, a text file and do what is necessary.

    Thus, for example, the following link gives us the list of hosts in maintenance mode:

    http://server-name/folder/hosts_in_mm_list.txt

    and the text file is in the format:

    name of the server, cluster, date

    Is there a way, like, get-content from a text file, I read directly from the URL, analyze the content of the text file, select the first parameter (the name of the server) and the output of the host of the MM.

    Thanks for your suggestions in advance.

    Kind regards

    Lalit

    Have you tried it like that

    $url = "http://server-name/folder/hosts_in_mm_list.txt" $file = "c:\names.txt"
    $web = New-Object System.Net.WebClient
    $web.DownloadFile($url, $file)
    $content = Get-Content $file
    $tgtHosts = "host1","host2","host3" $tgtComment = "Target comment"
    $hostnames = $content | %{
      $hostname, $comment = $_.Split(',')
      if($tgtHosts -contains $hostname -and $tgtComment -eq $comment){
        $hostname  }
    }
    

    If this does not work, you can attach the file downloaded, so I can have a look at what looks like the content?

  • Reading XML file

    Hi guys,.

    I want to read XML and tried with query below. But ' < requestedCompletionDate > 2011' value doesn't show up.

    Please can anyone suggest where it goes wrong.

    select x.requestedCompletionDate 
    from TABLE_X_JMS_MSG xjm
        ,XMLTABLE(XMLNamespaces(
             'http://www.metasolv.com/oss/ServiceActivation/2003' as "mslv-sa"
           , 'http://java.sun.com/products/oss/xml/Common' as "co"
           , 'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
           , '/createOrderByValueRequest'
                  PASSING XMLTYPE(XJM.X_MSG_XML)
                  COLUMNS requestedCompletionDate timestamp PATH 'orderValue xsi:type="mslv-sa:ASAPOrderValue"/requestedCompletionDate'
                 ) x         
    WHERE  XJM.X_MSG_XML LIKE  '%DDDD_1MC%'
    AND XJM.objid = '269738342'
    <?xml version="1.0" encoding="UTF-8"?>
    <createOrderByValueRequest xmlns="http://java.sun.com/products/oss/xml/ServiceActivation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co="http://java.sun.com/products/oss/xml/Common" xmlns:mslv-sa="http://www.metasolv.com/oss/ServiceActivation/2003" xmlns:serviceStatus="http://boss.clarify.com/ServiceStatus/v7.0" xmlns:extRef="http://boss.clarify.com/ExternalRef/v7.0" xmlns:mna="http://boss.clarify.com/capabilities/ManageNetworkActivation/v7.0" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sh="http://boss.clarify.com/2005/06/StandardHeader/">
      <orderValue xsi:type="mslv-sa:ASAPOrderValue">
        <apiClientId>OM-AAAMOB</apiClientId>
        <orderKey>
          <co:applicationContext>
            <co:factoryClass />
            <co:url />
            <co:systemProperties />
          </co:applicationContext>
          <co:type />
          <primaryKey>SUAUG31_1MC-2685883PEI1</primaryKey>
        </orderKey>
        <priority>3</priority>
        <requestedCompletionDate>2011-08-31T17:42:10</requestedCompletionDate>
        <services>
          <item xsi:type="mslv-sa:ASAPService">
            <serviceKey xsi:type="mslv-sa:ASAPServiceKey">
              <co:applicationContext>
                <co:factoryClass />
                <co:url />
                <co:systemProperties />
              </co:applicationContext>
              <co:applicationDN />
              <co:type>ASTPAID</co:type>
              <primaryKey>ait721661001</primaryKey>
              <mslv-sa:serviceSequenceNumber>1</mslv-sa:serviceSequenceNumber>
            </serviceKey>
            <mslv-sa:serviceValues>
              <mslv-sa:serviceValue xsi:type="mslv-sa:ASAPServiceValue">
                <mslv-sa:name>PROFILE</mslv-sa:name>
                <mslv-sa:value>2</mslv-sa:value>
                <mslv-sa:type>REQUIRED_SCALAR</mslv-sa:type>
              </mslv-sa:serviceValue>
              <mslv-sa:serviceValue xsi:type="mslv-sa:ASAPServiceValue">
                <mslv-sa:name>MSNN</mslv-sa:name>
                <mslv-sa:value>0000904</mslv-sa:value>
                <mslv-sa:type>REQUIRED_SCALAR</mslv-sa:type>
              </mslv-sa:serviceValue>
            </mslv-sa:serviceValues>
          </item>
        </services>
        <mslv-sa:parentKey>
          <co:applicationContext>
            <co:factoryClass />
            <co:url />
            <co:systemProperties />
          </co:applicationContext>
          <co:applicationDN />
          <co:type />
          <primaryKey />
        </mslv-sa:parentKey>
        <mslv-sa:origin>ASC Test Orders</mslv-sa:origin>
        <mslv-sa:organizationUnit>sddddwe</mslv-sa:organizationUnit>
        <mslv-sa:rollbackIfFail>true</mslv-sa:rollbackIfFail>
        <mslv-sa:batchGroup />
        <mslv-sa:externalSystemId>AWWWCS</mslv-sa:externalSystemId>
        <mslv-sa:srqAction>ADD</mslv-sa:srqAction>
        <mslv-sa:orderParameters />
        <mslv-sa:infoParms />
        <mslv-sa:extendedWoProperties />
      </orderValue>
    </createOrderByValueRequest>
    See you soon

    Sexy

    Hello

    Missing of the default namespace, which is actuallly the only one you need here.
    The prefix xsi is pre-defined so that you do not need to declare no more:
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e16659/xdb_xquery.htm#CBAJBDFA

    The XPath expression in the COLUMNS clause was wrong too.

    You can try this one (not tested, I don't have the correct version of db right now):

    SELECT x.requestedCompletionDate
    FROM TABLE_X_JMS_MSG xjm
       , XMLTABLE(
           XMLNamespaces(default 'http://java.sun.com/products/oss/xml/ServiceActivation')
         , '/createOrderByValueRequest'
           PASSING XMLTYPE(XJM.X_MSG_XML)
           COLUMNS requestedCompletionDate timestamp PATH 'orderValue[@xsi:type="mslv-sa:ASAPOrderValue"]/requestedCompletionDate'
         ) x
    WHERE XJM.X_MSG_XML LIKE '%DDDD_1MC%'
    AND XJM.objid = '269738342'
    ;
    

    Hope that helps.

  • Reading XML clob field

    Hi guys

    I want to read XML file that is stored as a clob in the database table (test_clob) in column (xml_file).

    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by xmlspy.com)-->
    <mslv-sa:orEvent xmlns:mslv-sa="http://www.metav.com/oss/Sctivation/2003" xmlns:tls="http://www.meolv.com/oss/Sctivation/2003" xmlns:co="http://java.sun.com/products/oss/xml/Common" xmlns:sa="http://java.sun.com/products/oss/xml/Sivation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <co:applicationDN/>
         <co:eventTime>2006-07-17T03:21:13</co:eventTime>
         <sa:currentState>closed.completed</sa:currentState>
         <sa:orderKey>
              <co:applicationDN/>
              <co:type/>
              <sa:primaryKey>SUAUG20_1ADSLCON-268554296-JOB-ISPSERVICE23</sa:primaryKey>
         </sa:orderKey>
         <sa:reason/>
         <mslv-sa:externalSystemId/>
         <mslv-sa:eventId>36</mslv-sa:eventId>
         <mslv-sa:eventStatus>1</mslv-sa:eventStatus>
         <mslv-sa:except>N</mslv-sa:except>
         <mslv-sa:rollbackExcept>N</mslv-sa:rollbackExcept>
         <mslv-sa:services>
              <mslv-sa:item>
                   <mslv-sa:serviceKey>
                        <co:applicationContext>
                             <co:factoryClass/>
                             <co:url/>
                             <co:systemProperties/>
                        </co:applicationContext>
                        <co:applicationDN/>
                        <co:type>ACT_POSTPAID</co:type>
                        <sa:primaryKey>aitorc01_5100719489001</sa:primaryKey>
                        <mslv-sa:serviceSequenceNumber>1</mslv-sa:serviceSequenceNumber>
                   </mslv-sa:serviceKey>
                   <mslv-sa:serviceState>active.completed</mslv-sa:serviceState>
              </mslv-sa:item>
         </mslv-sa:services>
    </mslv-sa:orderCompleteEvent>
    I use the following query just to read data from the file.
    select x.time
    FROM test_clob
            ,XMLTABLE('/mslv-sa:orderCompleteEvent/co:applicationDN/' 
                  PASSING XMLTYPE(test_clob.xml_file)
                  COLUMNS time VARCHAR2(100)PATH '/mslv-sa:orderCompleteEvent/mslv-sa:orderCompleteEvent/co:eventTime')x
    But its giving following error
    21:22:53  LPX-00801: XQuery syntax error at 'EOF'
    21:22:53  1   /mslv-sa:orderCompleteEvent/co:applicationDN/
    Please provide details


    See you soon

    Sexy

    Hi Vanessa,

    I see several issues here.

    -L' example of XML document you gave is not well-formed.
    -Some XPath expressions are false, i.e. they address anything in the document.
    -You must also declare the namespaces that you use in XMLTable.

    Assuming that the root element is actually "mslv - its: orderCompleteEvent", it should be better:

    SELECT x.eventtime
    FROM test_clob t
       , XMLTable(
           XMLNamespaces(
             'http://www.metav.com/oss/Sctivation/2003' as "mslv-sa"
           , 'http://java.sun.com/products/oss/xml/Common' as "co"
           )
         , '/mslv-sa:orderCompleteEvent'
           PASSING XMLTYPE(t.xml_file)
           COLUMNS eventtime timestamp PATH 'co:eventTime'
         ) x
    ;
    
  • I really need professional help in the analysis of XML to the XML Document, or I want to read XML

    Hi all

    I'm really looking for your sweet help. I have suffered for two days. I'm working on Blackberry java app. I have the xml file is located in "file:///store/home/user/myNotes.xml".

    I want to be able to parse the XML into XMLDocument to confront the NodeList and ChildNode.

    I always get Eception Exception RunTimeError

    NOTE the following prayer:

    1 - my JDK is 1.7.0.5.5 (SE) only

    2. I don't have "XMLSerializer" or "Transformer", or "TransformerFactory', 'KXML.

    3. all I want is just to be able to read XML above and analyzed to XMLDocument.

    Find my Java code below:

    =====================================================================================

    Private Sub parseXmlFile() raises {RuntimeException
    try {}

    XMLDocument DOM = null;
    private static final String fileN = "file:///store/home/user/myNotes.xml";
    FileConnection fc = (FileConnection) Connector.open (fileN);
    fc.openDataInputStream ();
    DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
    DocumentBuilder builder = factory.newDocumentBuilder ();
    InputStream is = getClass () .getResourceAsStream (fileN);
    DOM = builder.parse (is);
        
    } catch (Exception pce) {}
    Dialog.Alert (PCE. ToString());
    }
            
    }

    ======================================================================

    End of my Code

    Thank you very much for your time of reading and you answer to help me.

    I appreciate really.

    Dear all,

    Hello and thank you from the bottom of my heart. This works. My problem was absent "normalization."

    Thank you once again I ng3epa enjoyed your valuable contribution.

  • Reading XML document

    Hey programmers,.

    I opened a thread yesterday regarding recovery code XML from a server (http://supportforums.blackberry.com/t5/Java-Development/How-to-retrieve-XML-from-server-response/m-p...) and got several nice answers and so I thought that the problem had disappeared. In fact, he only changed form.

    So I have another question for you: how to recover data from a Document and display it on the screen?

    Number of points:

    -J' tried function getType() as suggested in the post mentioned, I get a text/xml response.

    -J' have tried to use the getTextContent() on the document to put it in a TextField, it might be a rookie mistake.

    -J' I tried to put my stream to a string, but then I get something like "rim.blabla.blabla@812371".

    -J' tried to simply open a dialog with the document.getTextContent () method, but a dialog box empty is displayed.

    -J' read this post (http://supportforums.blackberry.com/t5/Java-Development/cannot-read-nodes-in-xml/m-p/324562), I would do something like this to read my XML?

    Here are some relevant parts of my code (_http is my connection):

    DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
    DocumentBuilder builder = factory.newDocumentBuilder ();
    Doc document = builder.parse (_http.openInputStream ());
    _HTTP. Close();

    If (doc! = null) Dialog.inform ("reading the document"); Which appears still, so I guess that is not null

    I don't really know much to XML and any help would be much appreciated.

    Yet once, I give a lot of congratulations!

    I got my answer, it works when adapt you the code in XMLDemo with the solution provided by Jcarty in the post mentioned in the original post.

    In the end, it came to this:

    -Open the connection http and everything

    -retrieve data with:

    DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
    DocumentBuilder builder = factory.newDocumentBuilder ();
    Doc document = builder.parse (_http.openInputStream ());
    _HTTP. Close();

    -change the constructor of the XMLDemoScreen class so there Document as an argument:

    public XMLDemoScreen (Document doc) {...}

    -change the document acquired the manufacturer as:

    Document document = doc;

    But I suspect that it worked because the XML was fairly simple.

    In any case, thank you very much for your help Simon, Bravo to you as promised...

  • ORA-03113 "reading" XML of CLOB

    Hello

    I use XMLTable for reading XML to insert data into the DB table. I have:

    PROCEDURE IMPORT_XML)

    p_plik VARCHAR2,

    p_tp_id NUMBER,

    number of p_commit_po: = 500) IS

    l_blob_id TERYT_PLIKI.tp_blob_id%type;

    l_blob BLOB;

    XMLTYpe l_teryt_xml;

    L_Name varchar2 (100);

    l_type varchar2 (100);

    l_date varchar2 (100);

    -l_part varchar2 (100);

    XMLType l_rows;

    l_commit number (6);

    l_cnt_rows NUMBER: = 0;

    procedure do_commit is

    Start

    l_commit: = l_commit + 1;

    l_cnt_rows: = l_cnt_rows + 1;

    If l_commit > = p_commit_po then

    commit;

    l_commit: = 0;

    end if;

    end do_commit;

    BEGIN

    -# variable l_BLOB contains BLOB from a column of table #.

    Err.d ("convert BLOB CLOB type...', 'IMPORT_XML', 70 ');

    declare

    dest_lob CLOB.

    src_lob BLOB;

    the sum integer: = DBMS_LOB. LOBMAXSIZE;

    dest_offset integer: = 1;

    offset integer: = 1;

    number of blob_csid: = nls_charset_id ('AL32UTF8');

    lang_context integer: = 0;

    the warning integer: = DBMS_LOB. WARN_INCONVERTIBLE_CHAR;

    Start

    dest_lob: = empty_Clob();

    DBMS_LOB. CREATETEMPORARY (dest_lob, false);

    DBMS_LOB. OPEN (dest_lob, DBMS_LOB. LOB_READWRITE);

    DBMS_LOB. OPEN (l_blob, DBMS_LOB. LOB_READONLY);

    DBMS_LOB. () CONVERTTOCLOB

    dest_lob,

    l_blob,

    amount,

    dest_offset,

    offset,

    blob_csid,

    lang_context,

    (caveat);

    DBMS_LOB. Close (l_blob);

    l_teryt_xml: = XMLType (dest_lob);

    commit;

    DBMS_LOB. FREETEMPORARY (dest_lob);

    end;

    l_rows: = l_teryt_xml.extract('/teryt/catalog/row');

    l_commit: = 0;

    If l_name = "TERC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    ["COLUMNS"WOJ"PATH of the VARCHAR2 (20) ' col[@name="WOJ "]',

    ["VARCHAR2 (20)"POW"PATH" col[@name="POW"]',

    ["Path"GMI"VARCHAR2 (20) ' col[@name="GMI "]',

    PATH of VARCHAR2 (2) "RODZ" "col[@name="RODZ"]',"

    PATH of VARCHAR2 (50) "NAME" "col[@name="NAZWA"]',"

    PATH of VARCHAR2 (50) "NAZDOD" "col[@name="NAZDOD"]',"

    "[" "STAN_NA PATH" VARCHAR2 (10) ' col[@name="STAN_NA"] "

    ) x

    ) loop

    INSERT INTO TERYT_TERC (WOJ, POW, GMI, RODZ, NAME, NAZDOD, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ, r.NAZWA, r.NAZDOD, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "SIMC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "WOJ" VARCHAR2 COLUMNS (3) path "col[@name="WOJ"]',"

    ["" POW"VARCHAR2 (3) path" col[@name="POW"]',

    "GMI" VARCHAR2 (3) PATH "col[@name="GMI"]',"

    PATH of VARCHAR2 (2) "RODZ_GMI" "col[@name="RODZ_GMI"]',"

    ["" RM"VARCHAR2 (3) path" col[@name="RM"]',

    "MZ' VARCHAR2 (3) PATH" col[@name="MZ"]', "

    PATH of VARCHAR2 (60) "NAME" "col[@name="NAZWA"]',"

    "SYM' VARCHAR2 (7) PATH" col[@name="SYM"]', "

    PATH of VARCHAR2 (7) "SYMPOD" "col[@name="SYMPOD"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_SIMC (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAME, SYMBOL, SYMPOD, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ_GMI, r.RM, r.MZ, r.NAZWA, r.SYM, r.SYMPOD, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "ULIC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "WOJ" VARCHAR2 COLUMNS (3) path "col[@name="WOJ"]',"

    ["" POW"VARCHAR2 (3) path" col[@name="POW"]',

    "GMI" VARCHAR2 (3) PATH "col[@name="GMI"]',"

    PATH of VARCHAR2 (2) "RODZ_GMI" "col[@name="RODZ_GMI"]',"

    "SYM' VARCHAR2 (7) PATH" col[@name="SYM"]', "

    PATH of VARCHAR2 (7) "SYM_UL" "col[@name="SYM_UL"]',"

    PATH of VARCHAR2 (5) "CECHA" "col[@name="CECHA"]',"

    PATH of VARCHAR2 (50) "NAZWA_1" "col[@name="NAZWA_1"]',"

    PATH of VARCHAR2 (50) "NAZWA_2" "col[@name="NAZWA_2"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_ULIC (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ_GMI, r.SYM, r.SYM_UL, r.CECHA, r.NAZWA_1, r.NAZWA_2, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "WMRODZ" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "RM" VARCHAR2 COLUMNS (5) path "col[@name="RM"]',"

    PATH of VARCHAR2 (50) "NAZWA_RM" "col[@name="NAZWA_RM"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_WMRODZ (RM, NAZWA_RM, STAN_NA, TP_ID)

    VALUES (r.RM, r.NAZWA_RM, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    end if;

    validation work;


    When I'm loading file of type "SIMC" (the file size is approximately 32 MB), all right.

    When I am trying to load the "NEW" type (size file is about 80 MB), there's an ORA-03113.


    The problem is with the LOOP SELECTION, because

    Err.d ("name =" |) L_Name, cm, 80);

    connects name = ULIC


    What can I do to fix this?

    My DB is: Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    As Jason said, there are a bunch of useless stuff in there:

    -The VALIDATION inside the loop: do not do, commit only once, after that the job is done.

    -FOR lines: do not do this, use only one (possibly multi-table) INSERT SELECT.

    -BLOB CLOB conversion: not necessary, use the XMLTYPE constructor.

    -Extract from the XML document, that the work of the intermediate parties do in the whole structure directly.

    Basically, your procedure can be simplified to this couple of statements:

    -- insert XML into a temporary binary XMLType table, for performance :
    insert into tmp_xml values ( xmltype(l_blob, nls_charset_id('AL32UTF8')) );
    
    -- multitable insert into the target tables :
    INSERT FIRST
    WHEN l_name = 'TERC' THEN INTO
      TERYT_TERC (WOJ, POW, GMI, RODZ, NAZWA, NAZDOD, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ, NAZWA, NAZDOD, STAN_NA, P_TP_ID)
    WHEN l_name = 'SIMC' THEN INTO
      TERYT_SIMC (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAZWA, SYM, SYMPOD, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAZWA, SYM, SYMPOD, STAN_NA, P_TP_ID)
    WHEN l_name = 'ULIC' THEN INTO
      TERYT_ULIC (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, P_TP_ID)
    WHEN l_name = 'WMRODZ' THEN INTO
      TERYT_WMRODZ (RM, NAZWA_RM, STAN_NA, TP_ID)
      VALUES (RM, NAZWA_RM, STAN_NA, P_TP_ID)
    SELECT x.*
    FROM tmp_xml t
       , XMLTable('/teryt/catalog/row'
           PASSING t.object_value
           COLUMNS "WOJ"      VARCHAR2(20) PATH 'col[@name="WOJ"]',
                   "POW"      VARCHAR2(20) PATH 'col[@name="POW"]',
                   "GMI"      VARCHAR2(20) PATH 'col[@name="GMI"]',
                   "RODZ"     VARCHAR2(2)  PATH 'col[@name="RODZ"]',
                   "NAZWA"    VARCHAR2(50) PATH 'col[@name="NAZWA"]',
                   "NAZDOD"   VARCHAR2(50) PATH 'col[@name="NAZDOD"]',
                   "STAN_NA"  VARCHAR2(10) PATH 'col[@name="STAN_NA"]',
                   "RODZ_GMI" VARCHAR2(2)  PATH 'col[@name="RODZ_GMI"]',
                   "RM"       VARCHAR2(3)  PATH 'col[@name="RM"]',
                   "MZ"       VARCHAR2(3)  PATH 'col[@name="MZ"]',
                   "SYM"      VARCHAR2(7)  PATH 'col[@name="SYM"]',
                   "SYMPOD"   VARCHAR2(7)  PATH 'col[@name="SYMPOD"]',
                   "SYM"      VARCHAR2(7)  PATH 'col[@name="SYM"]',
                   "SYM_UL"   VARCHAR2(7)  PATH 'col[@name="SYM_UL"]',
                   "CECHA"    VARCHAR2(5)  PATH 'col[@name="CECHA"]',
                   "NAZWA_1"  VARCHAR2(50) PATH 'col[@name="NAZWA_1"]',
                   "NAZWA_2"  VARCHAR2(50) PATH 'col[@name="NAZWA_2"]',
                   "NAZWA_RM" VARCHAR2(50) PATH 'col[@name="NAZWA_RM"]'
         ) x
    ;
    

    where TMP_XML is defined as follows:

    create global temporary table tmp_xml of xmltype
    xmltype store as securefile binary xml;
    
  • Load and read XML file size more than 4 GB

    Hi all

    My environment is Oracle 10.2.0.4 on Solaris and I process to work with the XML file as below the detail of PL/SQL

    1. I read the XML file on the HTTP port in the XMLTYPE column to table.

    2. I read value n ° 1 of the table and extract of y to insert another table

    On test db, everything is working but I got below error when I use the XML production

    ORA-31186: Document contains too many nodes

    Current XML size about 100 MB, but the procedure must take over the size of XML file over 4 GB in the future.

    Below are some of my code for your info.

    1. reading XML by line in variable and inserting 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 the value of the cell in the 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 ' PASSAGE xt.) XMLDoc
    COLUMNS
    cvalueVARCHAR (50)PATH ' / ');

    :

    :

    BEGIN

    :

    :

    OPEN c_xml;
    SEEK c_xml INTO v_TempValue;
    < generate the insert statement in another table >
    OUTPUT WHEN c_xml % NOTFOUND;
    NARROW C_xml;

    :

    END

    And another problem is performance problem when the XML file is great, first step to XML content loading to XMLTYPE column slowly.

    Could you please suggest any solution to read large XML file and improve performance?

    Thank you in advance.

    Hiko

    Finally, change us source file to XML, CSV format and instead load the XML using SQL Loader.

  • Nested reading XML using XQUERY in the PL/SQL procedure

    I'm using Oracle 11 G.
    I have a PL/SQL procedure, which is reading XML using xquery XMLTYPE column in a table. The XML contains data of the DEPARTMENT and its SECTIONS. DEPARTMENT has a to-many with SECTIONS or a DEPARTMENT can have one or more SECTIONS, and there may be cases where the DEPARTMENT will have all SECTIONS.

    The XML structure is such that
    <DATA>
    label to identify a DEPARTMENT and all its corresponding SECTIONS.

    XML
    <ROWSET> 
    <DATA>
     <DEPARTMENT>
      <DEPARTMENT_ID>DEP1</DEPARTMENT_ID>
      <DEPARTMENT_NAME>myDEPARTMENT1</DEPARTMENT_NAME>
     </DEPARTMENT>
     <SECTIONS>
      <SECTIONS_ID>6390135666643567</SECTIONS_ID>
      <SECTIONS_NAME>mySection1</SECTIONS_NAME>
      </SECTIONS>
       <SECTIONS>
      <SECTIONS_ID>6390135666643567</SECTIONS_ID>
      <SECTIONS_NAME>mySection2</SECTIONS_NAME>
      </SECTIONS>
     </DATA>
     <DATA>
     <DEPARTMENT>
      <DEPARTMENT_ID>DEP2</DEPARTMENT_ID>
      <DEPARTMENT_NAME>myDEPARTMENT2</DEPARTMENT_NAME>
     </DEPARTMENT>
     <SECTIONS>
      <SECTIONS_ID>63902</SECTIONS_ID>
      <SECTIONS_NAME>mySection1</SECTIONS_NAME>
      </SECTIONS>
     </DATA>
    </ROWSET>
    XQUERY
    select
     department_id,
      department_name,
      sections_id,
      sections_name
    from
      OFFLINE_XML xml_list,
      xmltable(
        '
          for $department in $param/ROWSET/DATA
            return $department
        '
        passing xml_list.xml_file as "param"
        columns
          "DEPARTMENT_ID"   varchar2(100) path '//DEPARTMENT/DEPARTMENT_ID',
          "DEPARTMENT_NAME" varchar2(4000) path '//DEPARTMENT/DEPARTMENT_NAME',
          "SECTIONS_ID"     varchar2(100) path '//SECTIONS/SECTIONS_ID',
          "SECTIONS_NAME"   varchar2(4000) path '//SECTIONS/SECTIONS_NAME'
      ) section_list
    where
      xml_list.Status = 5
    The performance of the query, you receive an error
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton 
    sequence - got multi-item sequence
    It is natural because I have several sections, now how I'll handle this situation.

    It's the usual approach to manage several nested collections:

    SQL> select d.department_id
      2       , d.department_name
      3       , s.sections_id
      4       , s.sections_name
      5  from offline_xml t
      6     , xmltable(
      7         '/ROWSET/DATA'
      8         passing t.xml_file
      9         columns
     10           DEPARTMENT_ID   varchar2(20) path 'DEPARTMENT/DEPARTMENT_ID'
     11         , DEPARTMENT_NAME varchar2(30) path 'DEPARTMENT/DEPARTMENT_NAME'
     12         , SECTIONS        xmltype      path 'SECTIONS'
     13       ) d
     14     , xmltable(
     15         '/SECTIONS'
     16         passing d.sections
     17         columns
     18           SECTIONS_ID     varchar2(20) path 'SECTIONS_ID'
     19         , SECTIONS_NAME   varchar2(30) path 'SECTIONS_NAME'
     20      ) s
     21  ;
    
    DEPARTMENT_ID        DEPARTMENT_NAME                SECTIONS_ID          SECTIONS_NAME
    -------------------- ------------------------------ -------------------- ------------------------------
    DEP1                 myDEPARTMENT1                  6390135666643567     mySection1
    DEP1                 myDEPARTMENT1                  6390135666643567     mySection2
    DEP2                 myDEPARTMENT2                  63902                mySection1
     
    
  • Reading Messages from a uniform distributed queue without an MDB

    WebLogic Server Version: 10.3.4.0

    I am currently facing a problem trying to read messages from a queue of distributed uniform with a spring JMSTemplate Weblogic.
    We have a cluster created with 2 servers.
    Each server in the cluster has it's own server JMS (JMSServer-1, JMSServer-2), each has its own persistent store
    We have a JMSModule. This JMSModule contains a factory connections (Subdeployment = sub1 Target = mycluster) and also contains a uniform tail (Subdeployment = sub1 Target = MyCluster) distributed

    A peak at our Spring JNDITemplate configuration looks like:
    < bean id = "messagingJndiTemplate" class = "org.springframework.jndi.JndiTemplate" >
    < property name = "environment" >
    < Accessories >
    < prop key = "java.naming.factory.initial" > weblogic.jndi.WLInitialContextFactory < / prop >
    < prop key = "java.naming.provider.url" > t3://some.server.name1,some.server.name2:8001 < / prop >
    < / Accessories >
    < / property >
    < / bean >

    It seems that every time that I call the JMSTemplate.browse function in my client, I'll read the messages in the server 1. Then the next bed request messages that are found on server 2. Each request is sent around in circles.

    I then tried to change the JMSModule. The new JMSModule contains a factory connections (Subdeployment = sub1 Target = mycluster) and also contains a uniform distributed Queue (Subdeployment = sub2 Target = JMSServer-1, JMSServer-2)

    After this change, it seems that every time that I call the JMSTemplate.browse function, I'll read the messages in any server, I have a session with my client. If I'm logged on server 1, I can only see messages in Server 1 and vice versa.


    My question is, how to configure Weblogic to pass messages from TWO servers in my cluster? I guess since it was a cluster installation, I would get some sort of uniform distributed queue unique view to access via JNDI, but appears not to be the case.
    Thanks in advance.

    Browsers and receivers always attach to a single member of a destination distributed.

    WebLogic BMD, on the other hand, automatically handle the task of fixing the receivers to each Member and are fairly simple to code and use these days. If you have the possibility to use WL BMD, I recommend their use. (There is no equivalent for the browsers).

    Spring does not have the same STANDARD, but it seems not be a workaround for the spring receiver number (but not for browsers - receivers only). Here is a sample spring impl that attaches a subscription for each Member of a subject is distributed:
    http://sleeplessinslc.blogspot.com/2011/12/WebLogic-JMS-partitioned-distributed.html.

    If the foregoing is not useful and that you must scroll through each message on each server in the cluster, then you must write special code case to check each separately. There are two options to list the destinations and work with each of them - 'messages management' JMX mbean API (WLST Jython scripting or Java-based) and the availability of destination weblogic.jms.extensions API.

    HTH,

    Tom

  • How to read XML in blob field

    Hi guys,.

    Small need advise on your part.

    My requirement is to read the XML file, which is stored as a BLOB in a table through plsql code.

    Basically, I need to get the attribute values in the XML through code.



    See you soon

    Sexy

    And once you have the data as XMLTYPE data type like Johan said, you can retrieve the data by using the function XMLTABLE...

    for example

    WITH t as (select XMLTYPE('
    
      
        1
        1800
        
          1
          28
          6
          12
        
        
          5
          19
          1
          90
        
      
      
        2
        2400
        
          3
          14
          7
          5
        
      
    ') as xml from dual)
    -- END OF TEST DATA
    select x.country, x.point, y.user_id, y.target, y.state, y.task
    from t
        ,XMLTABLE('/RECSET/REC'
                  PASSING t.xml
                  COLUMNS country NUMBER PATH '/REC/COUNTRY'
                         ,point   NUMBER PATH '/REC/POINT'
                         ,user_info XMLTYPE PATH '/REC/*'
                 ) x
        ,XMLTABLE('/USER_INFO'
                  PASSING x.user_info
                  COLUMNS user_id NUMBER PATH '/USER_INFO/USER_ID'
                         ,target  NUMBER PATH '/USER_INFO/TARGET'
                         ,state   NUMBER PATH '/USER_INFO/STATE'
                         ,task    NUMBER PATH '/USER_INFO/TASK'
                 ) y
    
       COUNTRY      POINT    USER_ID     TARGET      STATE       TASK
    ---------- ---------- ---------- ---------- ---------- ----------
             1       1800          1         28          6         12
             1       1800          5         19          1         90
             2       2400          3         14          7          5
    
  • Read the source URL?

    Hello

    Sorry if the topic isn't clear, I don't know how else to describe it. Here my 'small' problem:

    I created a few video clips that play an animation before displaying the menu. I think it's cool, but of course, it would be sometimes boring after browsing my site after some time. So my thought was that I would somehow determine where the visitor came from (in my site or from outside) and pass the animation if it already displayed once.

    I guess I could insert a PHP variable that I could use for this, somehow but I think would be more elegant to read the source URL, so I'd appreciate any help/ideas on this.

    Thanks in advance!

    Hi, Mark.

    I think that the best approach could save a session variable. If this variable is not set, PHP writes the flash object with a param "animate = true" in the HTML code, for example. When PHP is invoked once again, if the variable exists in the session (and this will be, because you have just saved it), then you will not define the "animate = true" in the HTML code.

    If you want to check the URL of the source in any way, then you just need to check the referer by $_SERVER ['HTTP_REFERER']. As I said, I think that the first approach is better.

    See you soon,.

    CaioToOn!

  • Not well-formed XML from CF?

    I worked through the training from the Source Flex2 book (trapper, Boles, Talbot, etc.). In Lesson 17, this is to access the objects on the server side.

    A piece of code accesses a CF model, which brings in an XML file:
    -----
    < mx:HTTPService id = "prodByCatRPC".
    ' URL =' http://localhost/flexGrocer/xml/categorizedProducts.cfm '
    result = "prodByCategoryHandler (Event)" "
    resultFormat = "e4x" / >
    -----
    The CF file of the book plate has the following:
    ----
    < name cfheader = "Expires" value = "#now ()" # "/ >"

    < cfxml variable 'x' = >
    < cfinclude template = "categorizedProducts.xml" >
    < / cfxml >

    < cfset xmlObject = ToString (xProducts) >

    < cfcontent type = "text/xml" / >
    #variables.xmlObject # < cfoutput > < / cfoutput >
    -----
    Using the Flex file, I get a Runtime message that seems to indicate that the XML is not well-formed. (Here's a bit of the message, not sure that I understand it!) :

    [CPP faultString = error "" error #1088: the markup in the document following the root element must be well formed. "faultCode =" Client.CouldNotDecode"faultDetail ="null"]

    I'm ASSUMING that the CF page does not return the xml as you wish, because if I simply change the flex http service call in the xml file that the CF page is notably, the flex application runs as scheduled and without errors:
    ----
    ' URL =' http://localhost/flexGrocer/xml/categorizedProducts.xml '
    ----

    (something in the mech detachment made the statement url above messed, but you probably get what I mean)

    I'm a CF developer and have not used the exact method of the book to get the generated XML from CF, I did so successfully for Spry and other things.
    I tried some ot the things I had to do to get the CF generated XML to work in Spry with this flex, but nothing helped. Tried to add a reset = "true" with the tag cfcontent; " tried to wrap the cfcontent to output; added cfprocessing tags to suppresswhitespace.

    Appreciate all the thoughts/help on how to solve this problem. In addition, if others agree that the problem is with the XML that is generated rather than anything else.

    Thank you
    Keith

    After experimenting with several, I found the problem: didn't set the parameters of CF to NOT see the debug output. Make this setting, makes everything work fine.

    Oh, the little things that cause big problems!

    Keith

  • list item using xml from a django view


    I'm with django to deliver xml from a postgres database files. I have the connection using a HTTPService. I'm not able to get the XML to provide data to a list item.

    The mxml application is below:

    Quote:
    <? XML version = "1.0" encoding = "utf-8"? >
    < mx:Application
    ' xmlns:MX =' http://www.adobe.com/2006/mxml '
    layout = "absolute" >

    < mx:Script >
    <! [CDATA]
    Import mx.events.MenuEvent;
    Import mx.collections.ArrayCollection;
    Import mx.collections.XMLListCollection;
    Import mx.rpc.events.ResultEvent;
    Import mx.controls.Alert;


    [Bindable]
    private var emails: XMLListCollection = new XMLListCollection();
    [Bindable]
    private var units: collection ArrayCollection = new ArrayCollection();

    private void handleLoginClicked(event:MouseEvent):void {}
    svcAccountLogin.send ({username: "admin", password: "admin"});
    }

    private void handleLoginResult(event:ResultEvent):void {}

    trace (Event);
    trace (Event.Result);
    email = Event.Result.allMails.mail;
    Units = Event.Result.allUnits.Unit;

    }
    []] >
    < / mx:Script >

    < mx:HTTPService
    ID = "svcAccountLogin".
    "URL =" http://192.168.1.100:8080/accounts/login /? = / maillog following / "
    method = "POST".
    resultFormat = "xml".
    result = "handleLoginResult (Event)" / >


    < mx:VBox = "76" x y = "62" height = "100%" id = "loginUserPass" label = "Enter Username, password here" >

    < mx:Button id = "submitLoginBtn" label = "Login" click = "handleLoginClicked (event)" / >

    < mx:List id = "mailId".
    number of lines = "1".
    dataProvider = "{mails}.
    labelField = "mailFrom" >

    < / mx:List >
    < / mx:VBox >

    < / mx:Application >
  • Bootcamp - Windows 10 should not see or read files from the disk HARD Apple intern.

    I have just successfully Windows 10 next OS X on my 15 "Macbook Pro mid-2014.

    Windows 10 should not see or read files from the disk HARD Apple intern.

    Should which driver I uninstall?

    On OSX, if the following Terminal command produces any output, then you cannot read partition OSX on the side Windows? FileVault2 will also disable access to the OSX partition.

    Cs diskutil list

Maybe you are looking for

  • I can no longer access my gmail with the firefox browser, why?

    I try to check my g-mail and I get a notice that says something like:Firefox is no longer supported by google.

  • Problem with the last update

    I downloaded 9.2.1 update, now my screen is frozen, with the iTunes logo and the charging cable. Phone will not shut dow or turn on

  • HP ENVY TouchSmart 15 t-j000 Quad Edition PC laptop

    I'm looking for except one of the new envys with haswell processors.  But after I bought the laptop I want to replace the HDD with a SSD, this new body of the laptop seems really thin and I was wondering if someone again for sure if I'll be able to e

  • Player Windows Media displays is not on the screen

    My Windows Media Player is played, but it does not appear on the screen... it looks like its current running in the desktop background? Displays tasks on the bar but the screen? I can right click on the far right of my office and the WMP menu appears

  • WLC can communicate with light AP through Layer 3?

    We have totally autonomous access 20 points in several remote sites. Probably expand us the current wireless network in the future. Say 50 will be enough. We intend to change these autonomous AP to the lighter. Download the WLC to control. My questio