Package net.rim.device.api.xml.parsers

Examples of net.rim.device.api.xml.parsers.DocumentBuilder


            try {
                // Obtain the Browser field config
                BrowserFieldConfig bfConfig = getBrowserFieldConfig();

                // Create doc builder
                DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

                // Parse
                Object o = bfConfig.getProperty( BrowserFieldConfig.CONTROLLER );
                if( o instanceof BrowserFieldController ) {
                    BrowserFieldController bfController = (BrowserFieldController) o;

                    // Create request for config.xml file
                    BrowserFieldRequest request = new BrowserFieldRequest( WidgetUtil.getLocalPath( _configXML ) );
                    InputConnection inputConn = bfController.handleResourceRequest( request );

                    // Create a Document object out of the config.xml
                    _configXMLDoc = docBuilder.parse( inputConn.openDataInputStream() );
                }

            } catch( Exception e ) {
            }
        }
View Full Code Here


  public VoteStatus parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        VoteStatus voteStatus = new VoteStatus();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom   = builder.parse(is);
            NodeList items = dom.getElementsByTagName("VoteStatus");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

  public Photo parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        Photo photo = new Photo();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom   = builder.parse(is);
            NodeList items = dom.getElementsByTagName("Photo");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

        try {
            // Build a document based on the XML file.
            final DocumentBuilderFactory factory =
                    DocumentBuilderFactory.newInstance();
            final DocumentBuilder builder = factory.newDocumentBuilder();
            final InputStream inputStream =
                    getClass().getResourceAsStream(_xmlFileName);
            final Document document = builder.parse(inputStream);

            // Normalize the root element of the XML document. This ensures that
            // all Text
            // nodes under the root node are put into a "normal" form, which
            // means that
View Full Code Here

  public Settings parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        Settings settings = new Settings();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom   = builder.parse(is);
            NodeList items = dom.getElementsByTagName("ProfileSettings");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        final Profiles profiles = new Profiles();
       
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom         = builder.parse(is);
            dom.normalize();
            NodeList items         = dom.getElementsByTagName("Profiles");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
View Full Code Here

  public AddPhotoCommentResponse parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        AddPhotoCommentResponse response = new AddPhotoCommentResponse();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());

            Document dom         = builder.parse(is);
            NodeList items       = dom.getElementsByTagName("AddPhotoCommentResponse");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

  public FavoriteQueryResponse parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        FavoriteQueryResponse response = new FavoriteQueryResponse();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
                       
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom         = builder.parse(is);
            NodeList items       = dom.getElementsByTagName("FavoriteQueryResponse");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

   
        try {
            final Comments comments = new Comments();
           
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
                       
            ByteArrayInputStream is = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom         = builder.parse(is);
            NodeList items       = dom.getElementsByTagName("Comments");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

  public Comment parse() {
   
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        Comment comment = new Comment();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
           
            ByteArrayInputStream in = new ByteArrayInputStream(m_Xml.getBytes());
           
            Document dom         = builder.parse(in);
            NodeList items       = dom.getElementsByTagName("Comment");
           
            for (int i=0;i<items.getLength();i++){
                Node item       = items.item(i);
                NodeList properties = item.getChildNodes();
View Full Code Here

TOP

Related Classes of net.rim.device.api.xml.parsers.DocumentBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.