HTTP Communication tutorial - parsing of the XML file error

Hello again,

I went through the tutorial of HTTP Communication today is here. Built just fine and it loaded into the Simulator, however when I hit refresh to load the XML from an HTTP network call I get the error:

XmlDataModel: Analysis of the file error... /... /.. /Data/model.XML on line 14, column 8: "unexpected character.

After the end of the XML file, given the location of the character of line 14, column 8 is that it really confused me.

Any thoughts on how to bypass this?

The XML file can be found at https://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml

try changing the url https://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml

Tags: BlackBerry Developers

Similar Questions

  • Using the XML file error

    Hello

    I use an XML file as the source in a map. This worked well until I changed the context during the execution of the mapping.

    Initially, during the execution of the development, it worked without any problem. But when I changed the context to run the Test, he gave me the following error:-

    ODI-1227: task load data-LKM SQL for Oracle-don't work not to connect to the source P6_ACTIVITIES - TEST.

    Caused by: java.sql.SQLException: the object name already exists: P6ACTI_READACTIVITIESRESPONSE in the statement [create table P6ACTI_READACTIVITIESRESPONSE (READACTIVITIESRESPONSEPK NUMERIC (10) NOT NULL, SNPSFILENAME varchar (255) NULL, SNPSFILEPATH varchar (255) NULL, SNPSLOADDATE varchar (255) NULL)]

    This object name, P6ACTI_READACTIVITIESRESPONSE created by ODI is a combination of scheme name defined in the JDBC URL properties (or the first five characters of the XML file) and the element root. Therefore, I don't have any control over the name, unless I have change the schema name property.

    Restart the agent will solve the problem temporarily, but the error will appear again when the context is changed. My question is, how do I create/drop / let agent do this each time that the XML file is accessed ODI. I use ODI 12.1.3.

    Thanks in advance,

    Xmen

    Only, you should be able to query code KM to understand if these tables are created, but generally it will be in the scheme of work specified on your server of intermediate technology.

    We are not allowed to change the KMs, because it would create problems of alimony.


    Who with Oracle or internally? A large part of ODI power lies in an open framework around KMs and as long as you develop and test carefully any customizations KM I really can't see why the support would be a problem. You can run the table to fall outside the knowledge module, would be - this also be a support issue, the main difference is that a KM custom allows to reuse easier?

  • icon for the XML file error

    Hello
    My .xml files all appear a Notepad icon, but it can be opened correctly by the browser Internet Explorer, feathers and other functions are normal, just the icon does not appear correctly. How can I change the icon back to its original icon?
    In addition, everything is OK with my .xml files, but just the icon. It works fine including the default program to open it, but I like just his original icon.
    Thank you!
    Kyle

    Hi Kyle,.

    This method works well with shortcuts, so you can try it. Follow these steps to manually change the icon:

    a. right-click on an .xml file, and then select Properties.

    b. click on the shortcut tab, and then select change icon.

    c. select in the list and click Ok.

    Check whether the problem is resolved. Please let us know the status of the issue.

  • XML parser for the GPX file

    Hello

    I wonder how to get GPS to GPX file information. The GPX file is also XML, but I can't do the values "lat" and "lon" of the file.

    The GPX file:


    http://www.mooncity.pl"xmlns:nmea ="http://www.mooncity.pl">."
     
       
         
            150,0
           
            2D
            7
         

    Code:

    XML
    String _node, element;
    try {}
    DocumentBuilderFactory docBuilderFactory is DocumentBuilderFactory. newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    Doc document;
    doc = docBuilder.parse (fc.openInputStream ());
    doc.getDocumentElement () .normalize ();
    NodeList list = doc.getElementsByTagName ("*");
    Root = doc.getDocumentElement () of the element;
    NodeList list = root.getChildNodes ();
    _node = new String();
    element = new String();
    This loop 'for' is used to parse through the
    XML document and extract all the elements and their
    value, so they can be displayed on the device

    for (int i = 0; i)<>
    Node value = list.item (i).
    getChildNodes () .item (0);
    System.out.Print
    (list.item (i) .getNodeName ());
    System.out.println (value.getNodeValue ());
                    
    element value = .getNodeValue ();
    System.out.println
    (list.item (i) .getNodeValue ());
    System.out.println
    (element = value .getNodeValue ();
    updateField (_node, element);
             
    (_node, element);
    } //end for
    }
    catch (Exception e) {}
    System.out.println (try ());
    }
                        
    end of XML

    The output of the program:

    GPX
    TRK
    trkseg
    trkpt
    ele150.0
    time2009-08 - 22 T 11: 25:41 + 01:00
    fix2d
    SAT7

    Missing values:

    lat = lon "12.273434000" = "10.993777000."

    Are there other method or the GPX file scanner?

    You must get the attributes to read these values... Use the getAttributes method. You might could google to find examples of xml parsing.

  • How can I parse the XML file using the Oracle's Sql query.

    Hi all
    I have an XML file that must analyze and display the result according to the following example
    Can you please recommend me an approach to get the result.

    For example, here is my XML:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < xmlns:pi = "urn:com.workday / picof pi: Extract_Employees" >
    < IP: employee >
    < Additional_Information: pi > < pi: pi function: PriorValue = "" > Intern - masteri¿½s < / pi: function >
    < / pi: Additional_Information >
    < / pi: employee >
    < / pi: Extract_Employees >

    Databases:

    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production

    SQL > SELECT * FROM NLS_DATABASE_PARAMETERS;

    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS.,.
    WE8ISO8859P1 NLS_CHARACTERSET
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI. SSXFF AM
    NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    BINARY NLS_COMP
    NLS_LENGTH_SEMANTICS BYTES
    NLS_NCHAR_CONV_EXCP FAKE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.3.0



    The Xml file above with UTF-8 character sets which is multi bytes.

    But in my character database is WE8ISO8859P1 for example ISO-8859-1 (single-byte character set)

    SQL > SELECT extractValue (Value (x) ', ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof ' ')
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))


    which gives the following error:

    Error:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00200: could not convert from UTF-8 encoding to ISO-8859-1
    Error on line 1
    ORA-06512: at "SYS." XMLTYPE", line 295
    ORA-06512: at line 1

    Also I tried with this
    SQL > SELECT convert (extractValue (Value (x), ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof"'),'WE8ISO8859P1 ', 'UTF8'))
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))

    The same error is according to the above error message.

    Please help in this regard.

    Thank you and best regards,
    Sandrine

    You know the code of real character behind "" or you receive the file like that?

    For the record, "" is the wildcard of UTF-8 (0xEFBFBD), so that the original character of the means has already been replaced and that very probably the file was not coded properly in the first place.

    With respect to the resolution of the problem, try another method to read the file:

    SQL> select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
    
    VALUE
    ----------------------------------------
    WE8ISO8859P15
    
    SQL> SELECT x.*
      2  FROM XMLTable(
      3         XMLNamespaces(default 'urn:com.workday/picof')
      4       , '/Extract_Employees/Employee'
      5         passing xmltype(
      6                   dbms_xslprocessor.read2clob(
      7                     'COP_DIR'
      8                   , 'XML_Issue_227176.xml'
      9                   , nls_charset_id('AL32UTF8')
     10                   )
     11                 )
     12         columns job_title varchar2(30) path 'Additional_Information/Job_Title'
     13       ) x
     14  ;
    
    JOB_TITLE
    ------------------------------
    Intern -  Master¿s
     
    
  • having a problem with parsing the XML file

    Hi all
    I am trying to get data from XML file
    I want to only 4-5 values in this XML file
    Here is an example of XML file
    -< transaction >
    -< TransCtx >
    > < pAMETranType > IRCVACAPPROVAL < / pAMETranType >
    > < / TransCtx >
    > < / transaction >

    I want to add value and to store this value in table
    I'm here, I want to "IRCVACAPPROVAL".
    the tag
    < pAMETranType >

    for this purpose


    I created a procedure

    CREATE OR REPLACE PROCEDURE insert_xml_emps (p_directory in varchar2,
    > p_filename in varchar2)
    (> vtableName in varchar2) as
    > v_filelocator BFILE.
    > v_cloblocator CLOB.
    > l_ctx DBMS_XMLSTORE. CTXTYPE;
    > l_rows NUMBER;
    > v_amount_to_load NUMBER;
    > dest_offset NUMBER: = 1;
    > offset NUMBER: = 1;
    > lang_context NUMBER: = DBMS_LOB. DEFAULT_LANG_CTX;
    > WARNING NUMBER;
    > START
    > dbms_lob.createtemporary (v_cloblocator, true);
    > v_filelocator: = bfilename (p_directory, p_filename);
    > dbms_lob.open (v_filelocator, dbms_lob.file_readonly);
    > v_amount_to_load: = DBMS_LOB.getlength (v_filelocator);
    >-* this line is changed * -.
    > DBMS_LOB. LOADCLOBFROMFILE (v_cloblocator,
    > v_filelocator.
    > v_amount_to_load.
    > dest_offset.
    > offset.
    > 0,
    > lang_context.
    (> warning);
    >
    > l_ctx: = DBMS_XMLSTORE.newContext (vTableName);
    > DBMS_XMLSTORE.setRowTag (l_ctx, 'TRANSACTION');
    > DBMS_XMLSTORE.setRowTag (l_ctx, 'TRANSCTX');
    >-clear the update settings
    > DBMS_XMLStore.clearUpdateColumnList (l_ctx);
    >-set the columns to update a list of values
    > DBMS_XMLStore.setUpdateColumn (l_ctx, 'PAMETRANTYPE');
    >
    >-now insert the doc.
    > l_rows: = DBMS_XMLSTORE.insertxml (l_ctx, v_cloblocator);
    > DBMS_XMLSTORE.closeContext (l_ctx);
    > dbms_output.put_line(l_rows ||) "... inserted rows. ») ;
    > dbms_lob.close (v_filelocator);
    > DBMS_LOB. FREETEMPORARY (v_cloblocator);
    > END;

    I also have on the table who get this value

    whenever I call that created the procedure
    it sometime gives an error or sometime run correctly but store null in the table


    But when I change the XML file
    as
    When convert all lowercase letters in the capital then it works fine

    Is tehre to other ways to parse the XML file with no change in the XML file?

    Did you use the same test (with the exception of file name and directory) case?

    What I posted is a copy/paste direct SQL * Plus, and it works on version 11.2.0.1.

  • Need help to read the xml file and place it in a table.

    Nice day!

    Here is the configuration. I have a xml file from another source which will call a stored procedure in my database (which I am supposed to create). This is a first for me, I've never done development pl/sql or worked with xml. :(

    That's what I hoped to accomplish, if there is a better way, that I am open to him.
    In short, to have a stored procedure that takes the xml file (transmitted by third parties via the call, no url must be a file), creates a temporary table and populates the two columns needed. Then, the SP will make a select join with the temporary table and other data available in another schema. Once the completed table selection will be truncated and dropped. SP farm.

    Details:
    DB: Oracle 11.2.0.1 RAC.
    Charset: AL32UTF8
    Example of XML: (nearly 10,000 lines like this in production)
    "< MerchantID report =" "#" name = 'Conversion detail report' ReportStartDate = '2011-09-27 12:00:00GMT' ReportEndDate = '2011-09-27 21:38:13GMT"Version ="1.1"> < Conversion = '1234567891234567 D' MerchantReferenceNumber Convertingdate =" 2011-09-27 13:39:02 "RequestID ="1234567891234567891234"> < OriginalDecision > REVIEW < / OriginalDecision > < NewDecision > ACCEPT < / NewDecision > < Reviewer > testusr < / examiner > < ReviewerComments > no reason to reject. < / ReviewerComments > < Notes > < Note Date = "2011-09-27 13:39:02" AddedBy = "testusr" comment = "Took possession" / > < / Notes > < queue > Digital Review < / queue > < profile > Digital orders QA < / profile > < / Conversion > "
    ...
    < / report >

    What I tried.
    I found a tutorial: http://it.toolbox.com/blogs/oracle-guide/oracle-and-xml-in-action-a-real-world-example-5319 I tried and was able to make it work. But I could not duplicate the results with my xml file. So I looked away and have had no success. :( I'm not a developer, so I'm really bad...

    I found a note of support: (how to load an XML file into a Database Table using DBMS_XMLSave unaided Bfile [227476.1 ID]) and couldn't make it work.

    I found some online then Odie son xml and tried these but slipped and couldn't get my versions of these great answers to work for me.

    Then... I'm here now and hoping that someone could walk me through this.


    I tinkered this SP (it doesn't have to be that way, the suggestions are greatly appreciated)

    create or replace procedure xml_to_table (call_1 call_2) as

    Start
    run immediately "CREATE GLOBAL TEMPORARY TABLE XMLType IMRPT
    --(clé primaire contrainte-imrpt_pk (MerchantReferenceNumber))
    XmlType store as xml binary basicfile
    -(high compression)
    virtual columns
    (MerchantReferenceNumber as (xmlcast (xmlquery ('/ Conversion/MerchantReferenceNumber ' from object_value content back) as VARCHAR2 (32))))
    , NewDecision as (xmlcast (xmlquery ('/ Conversion/NewDecision ' from object_value content back) as VARCHAR2 (10)))
    )
    -ON COMMIT PRESERVE ROWS

    run immediately 'save xml as a file on the local system?'

    insert into IMRPT (MerchantReferenceNumber, NewDecision)

    run immediately "join select statement.
    run immediately 'truncate table IMRPT.
    run immediately "drop table IMRTP.

    end;
    /

    On my last test, I tried to select just in the xml file using this:

    DECLARE
    indomdoc DBMS_XMLDOM. DOMDocument;
    innode DBMS_XMLDOM. DOMNode;
    myParser DBMS_XMLPARSER.parser;
    buf VARCHAR2 (2000);
    BEGIN
    myParser: = DBMS_XMLPARSER.newParser;

    DBMS_XMLPARSER.setBaseDir (myparser, 'XML_DIR');
    DBMS_XMLPARSER. Parse (myParser, "test.xml");

    indomdoc: = DBMS_XMLPARSER.getDocument (myParser);

    -just to test content
    innode: = DBMS_XMLDOM.makeNode (indomdoc);
    DBMS_XMLDOM.writeToBuffer (innode, buf);
    Dbms_output.put_line (BUF);

    dbms_xmldom.freeDocument (indomdoc);
    dbms_xmlparser.freeParser (myParser);
    END;
    /

    It was another accident and burn.

    Any help would be appreciated.

    Thank you

    Like I said:

    Here is an example using a REF CURSOR variable ( you will need to declare a plus for your actual procedure )

    Your procedure has two parameters, you must declare two variables to hold the two REF CURSOR ;)

    DECLARE
    
      v_filename      VARCHAR2(50) := 'DMReport.xml';
      v_rc1            SYS_REFCURSOR;
      v_rc2            SYS_REFCURSOR;
    
      v_order_name       VARCHAR2(100);
      v_reason_text      VARCHAR2(100);
    
    BEGIN
    
      xml2table(v_filename, v_rc1, v_rc2);
    
      commit;
    
      loop
        fetch v_rc1 into v_order_name;
        exit when v_rc1%notfound;
        dbms_output.put_line('ORDER_NAME='||v_order_name);
      end loop;
    
      close v_rc1;
    
      loop
        fetch v_rc2 into v_order_name, v_reason_text;
        exit when v_rc2%notfound;
        dbms_output.put_line('ORDER_NAME='||v_order_name||', REASON_TEXT='||v_reason_text);
      end loop;
    
      close v_rc2;
    
    END;
    /
    

    If you test this in SQL * Plus, do not forget to SET SERVEROUTPUT ON to see the result.

  • Extracting XML error. The XML file that is assigned in the configuration.xml is either incorrect or damaged.

    1. some web pages gives "error extracting XML. The XML file that is assigned in the configuration.xml is wrong or corrupt.

    2 Youtube gives, after having pressed the button start, message "an error has occurred. Please try again later.
    Even youtube opening page with IE, there is no problem.

    3. scrolling on Mozilla firefox pages only works with the sidebar not with the mouse wheel.

    Other user accounts on this computer is not these problems.

    BR Juha

    This can be caused by a recent update of Flash 11.3.

    See:

  • How can I save xml file n, run the xml file? Please help me

    How can I save xml file n, run the xml file? Please help me

    Hello

    The question you have posted will be well suited in the MSDN forum. Click on the link below.

    http://social.msdn.Microsoft.com/forums/en/categories/

    In the meantime, I suggest you to return the item mentioned below.

    How to use XML Notepad to create an XML document

    http://support.Microsoft.com/kb/296560

  • RSS feeds save in the xml file in the device memory

    Hello

    I'm in the analysis of an RSS feed with SAX parser. Now, I want to record the first RSS an xml file in the memory of the device or on the SD card. Can someone guide me through this process

    To write in an XML rss content, start by creating the file with the extension ".xml" with the help of the FileConnection API, then write content (rss data) in the XML file.

    You can use code below to write the content in the file. We must give the path as a string & content in byte format.

    public boolean writeFile(String path, byte[] data)
        {
            javax.microedition.io.Connection c = null;
            java.io.OutputStream os = null;
            try {
                c = javax.microedition.io.Connector.open("file:///" + path, javax.microedition.io.Connector.READ_WRITE);
                javax.microedition.io.file.FileConnection fc =
                        (javax.microedition.io.file.FileConnection) c;
                if (!fc.exists())
                    fc.create();
                else
                    fc.truncate(0);
                os = fc.openOutputStream();
                os.write(data);
                os.flush();
                return true;
            } catch (Exception e) {
                return false;
            } finally {
                try {
                    if (os != null)
                        os.close();
                    if (c != null)
                        c.close();
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        }
    
  • Analysis of the XML file

    Hello

    I try to access a web service. I am currently using NetBeans 6.5. I am able to acess webservice by creating the stub.

    This draft is back this xml content in a string format

    so, when I try o use

    SAXParserFactory saxfact = SAXParserFactory.newInstance ();

    SAXParser sp = saxfact.newSAXParser ();

    Sax InputSource = new InputSource (temp); Temp is the string that's been out since the heel in a string format

    TPI Parse (Sax, this);    on this step, the code is throwing an exception

    / * org.xml.sax.SAXParseException:
    org.xml.sax.helpers.DefaultHandler.fatalError (+ 1)
    com.sun.ukit.jaxp.Parser.panic (+ 18)
    com.sun.ukit.jaxp.Parser.setinp (+ 203)
    com.sun.ukit.jaxp.Parser.parse (+ 42)
    analysis. (parsing.java:54)
    to call_to_webservice.run(call_to_webservice.java:54) * /.

    I'm stuck here

    I was trying to access xml directly, but the statement sp.parse () takes InputSource or InputStream

    need help very urgent

    Thanks in advance

    Hi Panknaik,

    Try this code,

    try {}
    SAXParserFactory plant = SAXParserFactory.newInstance ();
    SAXParser saxParser = factory.newSAXParser ();
    org.xml.sax.helpers.DefaultHandler Manager = new xmlReader (startTag, endTag); start and endtag you want to analyze.              InputStream in = new ByteArrayInputStream (response.getBytes("UTF-8"));
    InputSource source = new InputSource (in);
    saxParser.parse (source, handler);
    } catch (Exception e) {}

    ---------------------------------------------------------------------------

    Then extends DefaultHandle,

    /**
    * A class containing a generic logic to read an XML file.
    */
    class xmlReader extends DefaultHandler {}
    private String startTag; /**< start="" tag="" to="" be="" looked="" for.="">
    private String endTag. /**< end="" tag="" to="" be="" looked="" for.="">
    Private boolean currentTag;
    Private boolean Errortag.
    String tagValue;
           
    /**
    * Sets the start and end tag to be read in the XML file.
    startTag @param tag beginning.
    endTag @param tag end.
    */
    {} public xmlReader (startTag, endTag String String)
    this.startTag = startTag;
    this.endTag = endTag;
    }
           
    /**
    * Startup item implementation of the DefaultHandler.
    */
    ' public void startElement (String namespaceURI, String localName,
    String qualifiedName, attributes atts) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = true;
    ElseIf (localName.equals (startTag))
    currentTag = true;
    }
           
    /**
    * Implementation of the DefaultHandler element ends.
    */
    ' public void endElement (String namespaceURI, String localName,
    String QualifiedName) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = false;
    ElseIf (localName.equals (endTag))
    currentTag = false;
    Else if (currentTag == true) {}
    attribValue.addElement (tagValue); Add it to vector
    tagValue = "";
    }
    }
           
    /**
    * The treatment on the tag to read.
    ch @param String containing the tag.
    @param start starting location of the tag.
    @param tag length.
    */
    characters public Sub (ch of char [], int start, int length)
    throws SAXException {}
               
    Dim str As String = new String (ch);
    String tempTagValue = str.substring (start, start + length);
               
    If (Errortag is true)
    errorNo = Integer.parseInt (tempTagValue);
    Else if (currentTag == true)
    tagValue = tempTagValue;
    }
    }

    I think that it solve your problem.

    Kind regards

    -Jitu.

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

  • Processing the XML file

    I have a requirement to process a stream of xml files and load its content in the oracle as a name-value pair tables. Basically, my table has three columns ID, Detail_NM, Detail_val.  I have to extract the ID and the corresponding details and store it in this table. The XML file looks like in below.  I can use an extract sql but you are looking for the most effective way to do it. I would like to highlight the elements dynamically as an element may or may not be present in every game. for example. Second series below has address2 that isn't there in the first document set. Even if nothing new is introduced, I should be able to treat them without explicitly mentioning the name of the element.  Is there a better way to deal with?  Please, share your ideas.  Thanks in advance

    < document >

    < id > 546534 < /ID >

    < details >

    the New York < City > < / City >

    Ave de Rome 45 < address > < / address >

    < zip > 10281 < / Zip >

    < / details >

    < / document >

    < document >

    < id > 6785565 < /ID >

    < details >

    Dallas < City > < / City >

    < address > 56 locust ave < / address >

    < Address2 > 2nd floor < / address >

    < zip > 07454 < / Zip >

    < / details >

    < / document >

    user626688 wrote:

    Thanks again.  Yes, we can have a node root here.

    -What is the average size of a single XML entity? (Number of nodes, size in bytes)? -A file can be up to 2MB size. Each ID can have different elements from 0 to 200 under him. (Each document tag).

    Sorry, missed your last answer once again.

    If there is a root node, it is even simpler.

    And you can certainly use an intermediate binary table of XMLType:

    SQL> begin
      2
      3    -- insert as Binary XMLType
      4    -- optional step for small files
      5    insert into tmp_xml
      6    values (
      7      xmltype(bfilename('TEST_DIR','sample2.xml'), nls_charset_id('AL32UTF8'))
      8    );
      9
    10    -- parse and insert into the target table
    11    insert into my_table (id, detail_nm, detail_val)
    12    select x1.id
    13         , x2.detail_nm
    14         , x2.detail_val
    15    from tmp_xml t
    16       , xmltable('/Documents/Document'
    17           passing t.object_value
    18           columns id       number  path 'Id'
    19                 , details  xmltype path 'Details'
    20         ) x1
    21       , xmltable('/Details/*'
    22           passing x1.details
    23           columns detail_nm  varchar2(256)  path 'local-name(.)'
    24                 , detail_val varchar2(4000) path 'text()'
    25         ) x2 ;
    26
    27  end;
    28  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from my_table;
    
            ID DETAIL_NM            DETAIL_VAL
    ---------- -------------------- ------------------------
        546534 City                 New York
        546534 Address              45 Rome Ave
        546534 Zip                  10281
       6785565 City                 Dallas
       6785565 Address              56 locust ave
       6785565 Address2             2nd Floor
       6785565 Zip                  07454
    
    7 rows selected.
    
  • How to check if a node exists in the XML file?

    I was asked to program a method to import data from xml files in our Coldfusion 8 Web site, I am new to the use of XML.

    My method worked however I encountered the following error:

    Element NETWORKORDER. SECONDARYADDRESS. CONTACTNAME is undefined in MYDOC.

    Investigation on the node in the XML file was not present.

    Is there a method I can use to resolve this error by checking if a node exists in the xml file, which works with my current code below?

    <!--> reading XML file
    < cffile action = "read" file = "D:\website\XML\#FileName#" variable = "myxml" >
    < cfset mydoc = XmlParse (myxml) >

    <!--> to extract data from the XML of NDS file
    < cfset aPrimaryContactName =(#mydoc.NetworkOrder.PrimaryAddress.ContactName#) >
    < cfset aPrimaryContactNumber =(#mydoc.NetworkOrder.PrimaryAddress.ContactNumber#) >
    < cfset aPrimaryContactNumber = tostring(#mydoc.NetworkOrder.PrimaryAddress.ContactNumber#) >
    < cfset aPrimaryContactAddressLine1 =(#mydoc.NetworkOrder.PrimaryAddress.line1#) >
    < cfset aPrimaryContactAddressLine2 =(#mydoc.NetworkOrder.PrimaryAddress.line2#) >
    < cfset aPrimaryContactAddressLine3 =(#mydoc.NetworkOrder.PrimaryAddress.line3#) >
    < cfset aPrimaryContactAddressLine4 =(#mydoc.NetworkOrder.PrimaryAddress.line4#) >
    < cfset aPrimaryContactAddressLine5 =(#mydoc.NetworkOrder.PrimaryAddress.line5#) >
    < cfset aPrimaryContactCity =(#mydoc.NetworkOrder.PrimaryAddress.City#) >
    < cfset aPrimaryContactPostcode =(#mydoc.NetworkOrder.PrimaryAddress.PostalCode#) >
    < cfset aPrimaryContactCounty =(#mydoc.NetworkOrder.PrimaryAddress.CountrySubdivision#) >
    < cfset aPrimaryContactCountryCode =(#mydoc.NetworkOrder.PrimaryAddress.CountryCode#) >
    < cfset aPrimaryContactCountry =(#mydoc.NetworkOrder.SecondaryAddress.Country#) >
    < cfset aSecondaryContactName =(#mydoc.NetworkOrder.SecondaryAddress.ContactName#) >
    < cfset aSecondaryAttentionOfName =(#mydoc.NetworkOrder.SecondaryAddress.AttentionOfName#) >
    < cfset aSecondaryContactNumber =(#mydoc.NetworkOrder.SecondaryAddress.ContactNumber#) >
    < cfset aSecondaryContactAddressLine1 =(#mydoc.NetworkOrder.SecondaryAddress.line1#) >
    < cfset aSecondaryContactAddressLine2 =(#mydoc.NetworkOrder.SecondaryAddress.line2#) >
    < cfset aSecondaryContactAddressLine3 =(#mydoc.NetworkOrder.SecondaryAddress.line3#) >
    < cfset aSecondaryContactAddressLine4 =(#mydoc.NetworkOrder.SecondaryAddress.line4#) >
    < cfset aSecondaryContactAddressLine5 =(#mydoc.NetworkOrder.SecondaryAddress.line5#) >
    < cfset aSecondaryContactCity =(#mydoc.NetworkOrder.SecondaryAddress.City#) >
    < cfset aSecondaryContactPostcode =(#mydoc.NetworkOrder.SecondaryAddress.PostalCode#) >
    < cfset aSecondaryContactCounty =(#mydoc.NetworkOrder.SecondaryAddress.CountrySubdivision#) >
    < cfset aSecondaryContactCountryCode =(#mydoc.NetworkOrder.SecondaryAddress.CountryCode#) >
    < cfset aSecondaryContactCountry =(#mydoc.NetworkOrder.SecondaryAddress.Country#) >

    Since you already have the XML parsed in a document, the easiest is to use xmlSearch(). Take a look at the doc, it is pretty easy to use. Something as simple as:

    To the most complex as:

    And in both cases:

    Read the doc and google is your friend "coldfusion xmlsearch.

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

Maybe you are looking for