1. /*
  2. * Copyright 1999,2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * Created on 2007-2-16
  18. *
  19. */
  20. package peaklau.eaglefund;
  21. import nanoxml.XMLElement;
  22. import nanoxml.XMLParseException;
  23. /**
  24. * Parse index XML class<br>
  25. * <br>
  26. * @author peaklau <br>
  27. * email:<A HREF="mailto:peaklau@hotmail.com">peaklau@hotmail.com</A> <br>
  28. * <a href="http://www.peaklau.com/fund/english/">HomePage</a>
  29. * @version $Revision: 1.1 $ $Date: 2007/05/09 16:07:04 $
  30. */
  31. public class StockImageData extends XMLElement {
  32. private int []values;
  33. private static int count=0;
  34. public StockImageData(int []values){
  35. this.values=values;
  36. }
  37. public void init(){
  38. count=values.length-1;
  39. }
  40. public XMLElement createInstance(){
  41. //System.out.println("createInstance");
  42. return new StockImageData(values);
  43. }
  44. public void content(String value)throws XMLParseException{
  45. //System.out.println("content "+value);
  46. if(count>=0){
  47. values[count--]=Integer.parseInt(value);
  48. }
  49. }
  50. }