Used in Oracle XML parser... DOM or SAX?


Hello

My version of db:

Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

PL/SQL Release 11.2.0.1.0 - Production

CORE 11.2.0.1.0 Production

AMT for Linux: Version 11.2.0.1.0 - Production

NLSRTL Version 11.2.0.1.0 - Production

Question:

I get an XML feed and load it into a table temporary T1.

My requirement is to load it into the exact sequence that I get the lines in xml and also to fill a column in the temporary table as a sequence as 1 2 3 corresponding to lines in the xml file

When I load the xml, it is loaded in the same order the xml stream is sent. So no worries.

But while I was doing the research I learned to know that Oracle could use a DOM or SAX parser. If it uses SAX, then order is maintained as in XML. But if the DOM is used, the order will not be kept.

Please let me know, how can I maintain the order of xml as it is loading into a temporary table.

I suggest that you learn how to learn. Why you try to use the feature (DBMS_XMLSTORE) that you have not read clearly even the documentation?

A simple search for DBMS_XMLSTORE will find the Oracle documentation for this package in the XML DB Developer's Guide

http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_dbmstore.htm

And the FIRST PAGE of this link was this statement:

>

  • DBMS_XMLSTOREuse the Simple API for XML (SAX) to analyze the input XML document, there so scalability upper and lower memory required. DBMS_XMLSTORElets you enter XMLType data, in addition to CLOB andVARCHAR.

>

And the FIRST PAGE of your own question you HAVE posted this statement:

>

If it uses SAX, then order is maintained as in XML.

>

Why wasting you your time and ours asking questions that you can easily answer yourself?

Tags: Database

Similar Questions

  • Problem Oracle Datamodeler Script Rhino "oracle.xml.parser.v2.XMLParseException.

    Hello:

    Today, I have an unusual problem for me.

    In my relational model, I executed a sript easy rhino (only modify the properties, maxVolume,... leave an excel). At the time when I run the script don't have a problem. Then, I recorded the changes and close the template. Later, I opened the model once more and the model is completely crushed. All the columns in the tables are gone and the name of the tables, sometimes, change to TABLE_Number. This causes errors (for example) when you open a model:

    Oracle.Xml.Parser.v2.XMLParseException; lineNumber: 23; columnNumber: 2; ' < ' may not appear in the value of the attribute.

    Someone knows what is the problem or possible problem?

    Thank you.

    If you delete the table, you don't need to use setDirty (true). That method simply pass the flag this object has changed. If you delete the object there is another treatment.

    Probably, I can guess more if you post line 23 of the problematic file

    Philippe

  • B2B-50014: General Error: java.lang.ClassCastException: oracle.xml.parser.

    Hi gurus,

    Trying to pass a load of OAG XML 9.0 business partner remotely, via a channel of AS2 - message is signed and encrypted, Cert has been imported.

    I get the B2B-50014: General error.
    B2B is able to correctly identify the agreement.

    NEWSPAPERS:

    [2011 05-12 T 12: 27:03.292 + 00:00] [soa_ms_1] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@243d15ed] [username: < anonymous >] [ecid: bb3e7e8ee8316823:74cad781:12fc9c42815:-7ff5 - 0000000000172f4e, 0] [APP: soa-infra] error -: B2B-50014: General error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException []
    at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1571)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
    at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
    at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
    to oracle.integration.platform.blocks.executor.WorkManagerExecutor$ 1.run(WorkManagerExecutor.java:120)
    to weblogic.work.j2ee.J2EEWorkManager$ WorkWithListener.run (J2EEWorkManager.java:183)
    at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
    at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
    at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
    ... 8 more
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
    at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
    at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
    at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
    at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
    to oracle.integration.platform.blocks.executor.WorkManagerExecutor$ 1.run(WorkManagerExecutor.java:120)
    to weblogic.work.j2ee.J2EEWorkManager$ WorkWithListener.run (J2EEWorkManager.java:183)
    at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Error -: B2B-50014: General error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
    at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1571)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
    at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
    at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
    to oracle.integration.platform.blocks.executor.WorkManagerExecutor$ 1.run(WorkManagerExecutor.java:120)
    to weblogic.work.j2ee.J2EEWorkManager$ WorkWithListener.run (J2EEWorkManager.java:183)
    at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
    at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
    at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
    at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
    at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
    ... 8 more

    Please advise.

    Kind regards
    Jean-Luc.

    Hello, Josée.

    Else, it is an OAG - XML purchase order, so had the XSD, not the directive file.

    Thanks for pointing the finger, but fortunately I am aware that OAG is Protocol based on XML document and use XSD to validate and guidelines I meant XSD only. :)

    Kind regards
    Anuj

  • How to retrieve the image BLOB from database and display the image in rtf file using the Oracle XML Desktop 5.6.2 publication server?

    Hi all

    Here I have the image BLOB in the database files,

    I want to show the image to PDF using file to rtf using Oracle Xml Desktop Publisher,

    Hi all

    I found the solution for reading Image BLOB of data base & display in Pdf format.

    (1) read the image from DB.2) and then copy the picture using IO. UtilsCopy method to copy the picture

    (3) then encode with base64 converter then you will get the tag XML with Base64 as string then placed in your XML Code & preview the output, you will find the image

    Photo = (BlobDomain) currentRow.getAttribute ("Image");

    ByteArrayOutputStream OutputStream = new ByteArrayOutputStream();

                        Byte [] imageByte;
                          Byte [] b = null;
                        try {}
                        
                            IOUtils.copy (photo.getInputStream (), outputStream);
                            BS = outputStream.toByteArray ();
                            outputStream.flush ();
                            System.out.println("==="+BS.) Length);
                            Encoded byte [] is Base64.encodeBase64 (bs).;
                            encodedString = new String (encoded);
  • Using functions Oracle XML - sys_xmlgen and dbms_xmlgen

    I am new to Oracle 10 g and XML. I've been reading and practice with examples and understand a point of what is happening.

    Here's my problem: I have a student athlete who can have many rewards. How can I get several scholarships to work with sys_xmlgen or dbms_xmlgen? Or is this even possible?
    The data is stored in tables, XMLType.
    This problem uses several tables as a sport table, table of students and a table of prices.

    There is an example of output of a student with multiple tags within the tag of the student price:

    < student schoolSidNumber = '999-12-6745' fulltimeEnrollmentTermHere = 'S1' fulltimeEnrollmentYearHere = "2003" action = "none" firstName = "Import" lastName = 'Test' recruited 'M' = sex = 'Y' comments = date of birth "Created from the process of import." = '1971-09-12' Address1 = "123 University Drive" city = 'University City' State 'IN' = >
    < guardianName warden = "Mr. & amp; Ms. Import Test' homeFlag = 'Y' Address1 = "123 Avenue House" city = 'Brazil' state 'IN' = / >
    < year value "2008" action = 'none' = >
    < sport sportCode = "MBB" initialCounterFlag = 'Y' action = 'save' / >
    < aidLimits sportCode = "MBB" grantInAidAmt = "10000" costAttendAmt = "11000" / >
    < price action = 'save' saAidId = '0' fundCode = 'ATHLETES' sportCode = "MBB" rolloverFlag = "N" awardPeriod = "FY" awardAmount = "5000" awardDate = "2005-08-13" / >
    < price action = 'save' saAidId = '0' fundCode = "INST" sportCode = "MBB" rolloverFlag = "N" awardPeriod = "FY" awardAmount = "2000" awardDate = "2005-08-13" / >
    < continuingEligibility classDescription = "FRESHMAN" degreeDeclareDate = "" academicIneligible = "N" degreeReqHours = '120' degreeId = '1' saCumulativeGpa = "3,397" "
    totalDegreeHours = "26" / >
    < term action = 'save' termCode = 'S1' hoursAttempted = '12' hoursEarned = '12' gpa = "4.0" fullTimeFlag = "Y" / >
    < term action = 'save' termCode = 'S2' hoursAttempted = hoursEarned "14" = "14" gpa = '3.0' fullTimeFlag = 'Y' / >
    < / year >
    < original acceptedDate = "2002-04-01" >
    < testScore p1Score = '400' p2Score = '400' testCode = "S" testDate = "1999-05-31" / >
    < / original >
    < / student >

    I know I could do with dbms_output.put_line tags, but I want to take full advantage of Oracle XML.
    Any help would be greatly appreciated.

    Published by: user9507990 on August 5, 2009 08:37

    OK, I probably messed up a bit with joins (got duplicates), but here's the idea:

    SELECT
    xmlelement("students",
     xmlagg(
      xmlelement("student",
                 xmlattributes(stu.student_id as "studentId",
                               stu.student_last_name as "lastName",
                               stu.student_first_name as "firstName"),
       xmlagg(
        xmlelement("sport",
                   xmlattributes(spo.sport_actc_code as "sportCode",
                                 spo.sport_term_code as "termCode")
        )
       ),
       xmlagg(
        xmlelement("award",
                   xmlattributes(awd.award_fund_code as "fundCode",
                                 awd.award_accept_amt as "awardAmount",
                                 to_char(awd.award_accept_date, 'YYYY-MM-DD') as "awardDate")
        )
       )
      )
     )
    )
    FROM students stu
         JOIN sports spo ON spo.sport_pidm = stu.student_pidm
         JOIN terms ter ON ter.term_code = spo.sport_term_code
         JOIN awards awd ON awd.award_aidy_code = ter.term_aidy_code AND awd.award_pidm = stu.student_pidm
    GROUP BY stu.student_id, stu.student_last_name, stu.student_first_name
    ORDER BY stu.student_id;
    

    The query uses the XMLELEMENT and XMLAGG to build the structure:
    The root element is 'students', to which we add several child nodes of "student".
    XMLATTRIBUTES is used to set the attributes of an element.

    Another solution would be to produce a "gross" in canonical format (...) xml document Oracle from using DBMS_XMLGEN this query:

    SELECT stu.student_id, stu.student_last_name, stu.student_first_name,
           spo.sport_actc_code, spo.sport_term_code,
           awd.award_fund_code, awd.award_accept_amt, to_char(awd.award_accept_date, 'YYYY-MM-DD') award_accept_date
    FROM students stu
         JOIN sports spo ON spo.sport_pidm = stu.student_pidm
         JOIN terms ter ON ter.term_code = spo.sport_term_code
         JOIN awards awd ON awd.award_aidy_code = ter.term_aidy_code AND awd.award_pidm = stu.student_pidm
    ORDER BY stu.student_id, spo.sport_actc_code, awd.award_fund_code;
    

    And then apply an XSL transformation to achieve the desired result.

    Hope that helps.

    Published by: odie_63 on August 6, 2009 14:44

  • Oracle XML parsing

    Hello

    Is it possible to extract all the child XML elements without hard coding the path?

    Example:

    < forms >

    < category1 >

    < Type1 > 80 < / Type1 >

    < Type2 > 90 < / Type2 >

    < Type3 > 100 < / Type3 >

    < / Category1 >

    < Category2 >

    < > 80 Type4 < / Type4 >

    < > 90 Type5 < / Type5 >

    < Type6 > 100 < / Type6 >

    < / Category2 >

    < / form >

    I need to get the child all the values of elements by the path of coding is not difficult.

    Concerning

    Anthony

    I hope that you are looking for this

    Col TAGNAME format a30

    Col VALUE format a10

    with xml11g as

    (

    Select '

    80

    90

    100

    80

    90

    100

    "double myxml).

    Select x.*

    of xml11g t.

    XMLTable

    (PASSAGE of "$d / / (*) ' XMLTYPE (t.myxml)"d")

    columns

    TagName varchar (20) PATH "name()"

    the value of path ACCESS of VARCHAR (60) "data (.)".

    ) IN THE FORM X

    where tagname as 'Type % ';

    TAGNAME VALUE

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

    Type1 80

    Type2 90

    Type3 100

    Type4 80

    Type5 90

    Type6 100

    6 selected lines.

  • 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
     
    
  • I get random failures to load a page with the XML parsing error: entity not defined using firefox 4

    This didn't happen with the version 3 x, nor with the previous v4. Using the arrow to the left and clicking on the previous page request usually works ok. It happens several times a day. Full error is

    XML parsing error: undefined entity
    Location: jar:jar:file:///C:/Documents%20and%20Settings/shirley/Application%20Data/Mozilla/Firefox/Profiles/4txi20jj.default/extensions/ [email protected]! /chrome/bandwidthmeter.jar!/content/netError.XHTML

    392, column 33 line number:

    & netOffline.longDesc;

    I am also getting this error and have been able to understand that its caused by the Bandwidth_Meter_and_Diagnostics - 1.2.5.xpi. This deactivation seems to have stopped the error, but is a major nuisance.

  • who is the fastest xml parser?

    Currently, I have a question parsering a huge xml, so I want to know what is the fastesr xml parser.

    Thank you.

    PS: Sorry for my English

    We wrote our own, based on something we found on the web, I think it was called tiny XML.  We did things like namespace that we didn't need treatment.  It works on twice the speed of the RIM provided one.  KXML is faster that RIM provided one as well?

    You treat using SAX or DOM we use SAX.  I think that SAX is the faster option.

    You have to use XML?  I've not actually directly compared, but it wouldn't surprise me if JSON is not faster.

  • [request] The XML parsing

    
    7Eagle kids Volunteer6Volunteer IT5Usher Umum4Pendoa3Multimedia2Creative Ministry1Praise and Worship
    

    This is my XML

    My question is:

    How to read on my blackberry and view it?

    can I get the data as a String type?

    Thank you very much

    hope you can help me

    Sorry for my bad English

    package mypackage;
    import javax.microedition.io.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    
    class XML_Parsing_Sample extends UiApplication{
        //creating a member variable for the MainScreen
        MainScreen _screen= new MainScreen();
        //string variables to store the values of the XML document
        String _node,_element;
        Connection _connectionthread;
    
        public static void main(String arg[]){
            XML_Parsing_Sample application = new XML_Parsing_Sample();
            //create a new instance of the application
            //and start the application on the event thread
            System.out.println("lalalala");
            application.enterEventDispatcher();
        }
    
        public XML_Parsing_Sample() {
            _screen.setTitle("XML Parsing");//setting title
            _screen.add(new RichTextField("Requesting....."));
            _screen.add(new SeparatorField());
    
            pushScreen(_screen); // creating a screen
            //creating a connection thread to run in the background
            _connectionthread = new Connection();
            _connectionthread.start();//starting the thread operation
        }
    
        public void updateField(String node, String element){
            //receiving the parsed node and its value from the thread
            //and updating it here
            //so it can be displayed on the screen
            String title="Title";
            _screen.add(new RichTextField(node+" : "+element));
    
            if(node.equals(title)){
                _screen.add(new SeparatorField());
            }
        }
    
        private class Connection extends Thread{
            public Connection(){
                super();
    
            }
    
            public void run(){
                // define variables later used for parsing
                Document doc;
                StreamConnection conn;
    
                try{
                    //providing the location of the XML file,
                    //your address might be different
    
                    conn=(StreamConnection)Connector.open
                      ("http://localhost/ms/write.xml");
                    //next few lines creates variables to open a
                    //stream, parse it, collect XML data and
                    //extract the data which is required.
                    //In this case they are elements,
                    //node and the values of an element
                    DocumentBuilderFactory docBuilderFactory
                      = DocumentBuilderFactory. newInstance();
                    DocumentBuilder docBuilder
                      = docBuilderFactory.newDocumentBuilder();
                    docBuilder.isValidating();
                    doc = docBuilder.parse(conn.openInputStream());
                    doc.getDocumentElement ().normalize ();
                    NodeList list=doc.getElementsByTagName("*");
                    _node=new String();
                    _element = new String();
                    //this "for" loop is used to parse through the
                    //XML document and extract all elements and their
                    //value, so they can be displayed on the device
    
                    for (int i=0;i
    

    I used this source code, but nothing is displayed...

    and don't forget, I am a new blackberry device programming, so I then I thank you if you can explain it in the explanation of "simple".

    God bless you

    Hello peter, how are you?

    Thanks for the reply...

    package mypackage;
    import javax.microedition.io.*;
    import javax.wireless.messaging.Message;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    
    class XML_Parsing_Sample extends UiApplication{
        //creating a member variable for the MainScreen
        MainScreen _screen= new MainScreen();
        //string variables to store the values of the XML document
        String _node,_element;
        Connection _connectionthread;
    
        public static void main(String arg[]){
            XML_Parsing_Sample application = new XML_Parsing_Sample();
    
            //create a new instance of the application
            //and start the application on the event thread
            application.enterEventDispatcher();
        }
    
        public XML_Parsing_Sample() {
            _connectionthread = new Connection();
            _connectionthread.start();//starting the thread operation
            _screen.setTitle("XML Parsing");//setting title
            _screen.add(new RichTextField("Requesting....."));
            _screen.add(new SeparatorField());
    
            pushScreen(_screen); // creating a screen
            //creating a connection thread to run in the background
    //        _connectionthread = new Connection();
    //        _connectionthread.start();//starting the thread operation
        }
    
        public void updateField(String node, String element){
            //receiving the parsed node and its value from the thread
            //and updating it here
            //so it can be displayed on the screen
            String title="Title";
            _screen.add(new RichTextField(node+" : "+element));
    
            if(node.equals(title)){
                _screen.add(new SeparatorField());
            }
        }
    
        private class Connection extends Thread{
            public Connection(){
                super();
    
            }
    
            public void run(){
                // define variables later used for parsing
                Document doc;
                StreamConnection conn;
    
                try{
                    //providing the location of the XML file,
                    //your address might be different
    
                    conn=(StreamConnection)Connector.open
                      ("http://localhost/ms/write.xml");
                    //next few lines creates variables to open a
                    //stream, parse it, collect XML data and
                    //extract the data which is required.
                    //In this case they are elements,
                    //node and the values of an element
                    DocumentBuilderFactory docBuilderFactory
                      = DocumentBuilderFactory. newInstance();
                    DocumentBuilder docBuilder
                      = docBuilderFactory.newDocumentBuilder();
                    docBuilder.isValidating();
                    doc = docBuilder.parse(conn.openInputStream());
                    doc.getDocumentElement ().normalize ();
    
                    NodeList list=doc.getElementsByTagName("root");
    
                    _node=new String();
                    _element = new String();
                    int n = list.getLength();
                    String[] choices= new String[n];
                    //this "for" loop is used to parse through the
                    //XML document and extract all elements and their
                    //value, so they can be displayed on the device
    
                    for (int i=0;i
    

    I already have the code, but nothing appeared.

    I think that there is something wrong with my code (the one in bold)

    and I get all confused, there are 2 methods for parsing xml, DOM and SAX.

    I don't know what they are... and how to use...

    can you help me pleaseee peter ?

    appriciate your help

  • XControls, XProblems, of XML parsing

    I use a motor of Action (functional overall) to keep a reference to a DOM Document, with several States to manipulate the document.  I call the engine action XControls on Init and Uninit VI, so that there are XML elements that are added/removed by the engine of the action when the XControl is added or deleted a VI.  I am able to add many copies of the XControl without problems.  Often I can go on adding and removing XControls several times.  Randomly, however, I get a 15 warning associated with the XML parser, indicating that the Document DOM resource is not valid.  From this moment, I'm more able to make changes to the document - I can view the XML associated with the DOM using XML Document to get, but am not able to manipulate it in any way.  It is as if the object or reference has corrupted.

    Y at - it a known bug related to this?  If I run the motor of action independent of the XControl I don't get this problem.  XControls tend to corrupt the references in external screw for the XControl?

    I'm using LabVIEW 8.6.  Thanks for any help.

    LaRisa,.

    It turns out that it is not necessarily a bug.  The problem arises from the way LabVIEW automatically cleans references for the screws that are no longer active.  I called the overall functioning of the XControls in the Init and Uninit capacity live after the creation and deletion of multiple copies of one the XControl on my front, LabVIEW must have decided that I used is no longer the global functional and empty its references VI.

    To resolve this problem, I now initialize the functional overall in a hidden 'main' VI which runs as long as I have any XControls on the front panel.  The case put the functional overall in a calling tree remains active rather than one that is more sporadic, such as the call XControl VI tree.

    I can understand why there was a problem, given the unusual delivery XControls.

    Thanks for following, I hope this helps others when generating XControls - they are really not so bad once you get used to their strange behavior.

  • The XML parsing problems

    I started with the sample of XML parsing and tried to get a simple user interface that loads buttons with the value of a child node (more later to go to a new screen and analyze another XML code).  When I analyze the XML code, I get the knots, but I don't get the values.  My example of XML is generated.

    Example of XML data:

    
    
    
    
             Bugs     BugsXML.action 
    
    
    

    Code:

    import java.io.InputStream;
    
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import mbt.util.DataUtils;
    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.xml.parsers.DocumentBuilder;
    import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    public class XMLViewer extends UiApplication {
    
      MainScreen _screen = new MainScreen();
      public static final boolean isTest = true;
      ConnectionThread _conThread;
      public final String xmlUrl;
    
      public static void main(String args[]) {
        XMLViewer viewer = new XMLViewer();
        viewer.enterEventDispatcher();
      }
    
      public XMLViewer() {
        this.xmlUrl = "http://localhost:8080/FooXML.action";
        this._screen.setTitle("XML Viewer");
        this._screen.add(new RichTextField("Requesting update..."));
        this._screen.add(new SeparatorField());
        pushScreen(this._screen);
        this._conThread = new ConnectionThread();
        this._conThread.start();
      }
    
      public void updateField(String name, String action) {
        synchronized (Application.getEventLock()) {
          ButtonField button = new ButtonField(name,
            ButtonField.CONSUME_CLICK | ButtonField.FOCUSABLE |
            ButtonField.USE_ALL_WIDTH){
              protected boolean navigationClick(int status, int time) {
                System.out.println("Name: " + this.getLabel());
                return true;
              }
          };
          this._screen.add(button);
        }
      }
    
      private class ConnectionThread extends Thread {
        public ConnectionThread() {
          super();
        }
        public void run() {
          Document doc;
          try {
            int i,j;
            DocumentBuilderFactory docFactory =           DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            InputStream is = DataUtils.getXMLActions(xmlUrl);
            if (is == null) {
              System.out.println("InputStream is null!");
              return;
            }
            doc = docBuilder.parse(is);
            doc.getDocumentElement().normalize();
            NodeList list = doc.getElementsByTagName("action");
            for (i=0;i
    

    I get this result:

    HTTP STATUS OKItem: 1 has name: name has text: null has value: nullItem: 3 has name: url has text: null has value: null
    

    You can see this link, it may be useful for you

    http://supportforums.BlackBerry.com/T5/Java-development/help-with-parsing-XML-XMLParseDemo-Java/TD-p...

  • XML Parsing Error: unexpected scanner place State: jar:file:///C:/Program%20Files%20 (x 86) /Mozilla%20Firefox/browser/omni.ja!/chrome/browser/content/browser/ab

    Madam/Sir,

    I log on this site everyday to make a contribution (http://theanimalrescuesite.greatergood.com/clickToGive/home.faces?siteId=3) and during the last three days, I was unable to connect. Today, I get this message: XML parsing error: State unexpected location parser: jar:file:///C:/Program%20Files%20 (x 86) /Mozilla%20Firefox/browser/omni.ja!/chrome/browser/content/browser/abt

    Best regards

    Peter

    What Firefox locale (UI language) do you use?

    Try a clean reinstall and delete the program folder before Firefox to (re) install a new copy of the current version of Firefox.

    If possible to uninstall your current version of Firefox to clean the Windows registry and settings in the security software.

    • Do NOT remove the "personal data" when you uninstall your current version of Firefox, because this will remove all profile folders and you lose personal data such as bookmarks and passwords including data profiles created by other versions of Firefox.

    Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.

    • (32-bit Windows) "C:\Program Files\Mozilla Firefox\"
    • (Windows 64 bit) "C:\Program Files (x 86) \Mozilla.

    Your bookmarks and other personal data are stored in the Firefox profile folder and will not be affected by a uninstall and (re) install, but do NOT delete personal data when you uninstall Firefox which removes all Firefox profile folders and you lose your data.

  • Error after installing FF34 on FF33: XML Parsing Error: undefined entity WebIDE

    Hello
    After installing FF34 on FF33 I get a window with this message when I close windows firefox closes too:

    XML parsing error: undefined entity
    Location: chrome://browser/content/browser.xul
    Line number 320, column 5: key < = "" command = "tools: WebIDE ' id = 'key_webide' keycode =" & amp; webide.keycode; "p =" ">."
    < / key >

    ^

    What Firefox locale (UI language) do you use?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • I tried to view my tabs on other computers and received this message: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: the window id = "tabs-display" ^ How can I fix?

    "Error message has been: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: window (weeks =" "3 =" "4 =" "5 =" "7 =" "< =" "^ =" "a =" "Add - on. =" "it y =" ' am = "" a = "" and = "" are = "" avg = "" believe = "" time = "" but = "" impossible = "" some = "" computers = "" firefox = "" for = "" I = "" I = "" id = 'tabs-view' in = "" installed.. = "" it = "" months) = "" = "" on. "" "" "" "" = "" or = "" other = "" p = "" paid = "" remember = "" running = "" sometimes = "" sync = "" tabs = "" version = "" look a = "" was = "" we = "" some = "" when = "" windows = "" worked = "" > < / window > "

    Hello!

    Can you give us some details? When this message display? Is in your phone or your computer? What is your language? More information you can give us the best.

    You use the add-on and Firefox 4? If so, I'll ask you to disable and remove the add-on: Sync is now part of the Firefox browser and you don't need the add-on. [https://bugzilla.mozilla.org/show_bug.cgi?id=644894 some users solved this problem by uninstalling the add-on.]
    ]

Maybe you are looking for