Package com.google.gwt.xml.client

Examples of com.google.gwt.xml.client.Document


      @Override
      public void loaded()
      {
        PUWeb.engine().fillTexture(mPokemonTexture, image);
       
        Document infoDom = XMLParser.parse(imageInfo);
       
        NodeList sprites = infoDom.getElementsByTagName("sprite");
        PU_Resources.this.mPokemonCount = sprites.getLength();
        for(int i = 0; i < sprites.getLength(); i++)
        {
          Element element = (Element) sprites.item(i);
         
View Full Code Here


 
  public PU_Font(WebGLTexture texture, String info)
  {
    mImage = new PU_Image(256, 256, texture);
   
    Document infoDom = XMLParser.parse(info);
    Element common = (Element)infoDom.getElementsByTagName("common").item(0);
    mLineHeight = Integer.parseInt(common.getAttribute("lineHeight"));
   
    NodeList chars = infoDom.getElementsByTagName("char");
    for(int i = 0; i < chars.getLength(); i++)
    {
      Element character = (Element) chars.item(i);
     
      PU_FontCharacter fontCharacter = new PU_FontCharacter();
View Full Code Here

    if (responseTxt == null) {
      return;
    }
   
    String error = null;
    Document doc = null;
    try {
      doc = XMLParser.parse(responseTxt);
      error = Utils.getXmlNodeValue(doc, "error");
    } catch (Exception e) {
      if (responseTxt.toLowerCase().matches("error")) {
View Full Code Here

  public XmlReader(ModelType modelType) {
    this.modelType = modelType;
  }

  public ListLoadResult read(C loadConfig, Object data) {
    Document doc = XMLParser.parse((String) data);
    Node root = doc.getFirstChild();
    NodeList list = doc.getElementsByTagName(modelType.recordName);
    ArrayList<BaseModel> records = new ArrayList<BaseModel>();
    for (int i = 0; i < list.getLength(); i++) {
      Node node = list.item(i);
      Element elem = (Element) node;
      BaseModel model = new BaseModel();
View Full Code Here

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    String id = (String)event;
    String xml = response.getText();
    Document messageDom = XMLParser.parse(xml);
    InstanceDataView view = (InstanceDataView)controller.getView(InstanceDataView.ID);
    view.update(id, messageDom);
  }
View Full Code Here

                  Messages.getString( "softwareUpdates" ), Messages.getString( "noUpdatesAvailable" ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
          dialogBox.center();
        }

        public void onResponseReceived( Request request, Response response ) {
          Document doc = XMLParser.parse( response.getText() );
          NodeList updates = doc.getElementsByTagName( "update" ); //$NON-NLS-1$
          if ( updates.getLength() > 0 ) {
            FlexTable updateTable = new FlexTable();
            updateTable.setStyleName( "backgroundContentTable" ); //$NON-NLS-1$
            updateTable.setWidget( 0, 0, new Label( Messages.getString( "version" ) ) ); //$NON-NLS-1$
            updateTable.setWidget( 0, 1, new Label( Messages.getString( "type" ) ) ); //$NON-NLS-1$
View Full Code Here

          // already loaded - skip this one and load the next
          OverlayLoader.this.loadOverlays( index + 1 );
        } else {
          loadedOverlays.add( id );
          final boolean applyOnStart = id.startsWith( "startup" ) || id.startsWith( "sticky" );
          final Document doc = XMLParser.parse( overlayToLoad.getSource() );
          final String bundleUri = overlayToLoad.getResourceBundleUri();
          String folder = ""; //$NON-NLS-1$
          String baseName = bundleUri;

          // we have to separate the folder from the base name
View Full Code Here

            event.setMessage( "Click" );
            EventBusUtil.EVENT_BUS.fireEvent( event );
            boolean cutSameDir = false;
            if ( getChildrenResponse.getStatusCode() >= 200 && getChildrenResponse.getStatusCode() < 300 ) {
              boolean promptForOptions = false;
              Document children = XMLParser.parse( getChildrenResponse.getText() );
              NodeList childrenNameNodes = children.getElementsByTagName( NAME_NODE_TAG );
              List<String> childNames = new ArrayList<String>();
              for ( int i = 0; i < childrenNameNodes.getLength(); i++ ) {
                Node childNameNode = childrenNameNodes.item( i );
                childNames.add( childNameNode.getFirstChild().getNodeValue() );
              }
View Full Code Here

    }
  }

  private List<String> getSortedItems( String type, Response response ) {
    String txt = response.getText();
    Document doc = XMLParser.parse( txt );
    NodeList items = doc.getElementsByTagName( type );
    final List<String> itemsSorted = new ArrayList<String>();
    for ( int i = 0; i < items.getLength(); i++ ) {
      itemsSorted.add( items.item( i ).getFirstChild().getNodeValue() );
    }
    Collections.sort( itemsSorted );
View Full Code Here

   * Get owner name from acl response
   *
   * @param response
   */
  protected void setAclResponse( Response response ) {
    Document permissions = XMLParser.parse( response.getText() );
    ownerLabel.setText( permissions.getElementsByTagName( OWNER_NAME_ELEMENT_NAME ).item( 0 ).getFirstChild()
      .getNodeValue() );
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.xml.client.Document

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.