ÿÌìѧһµãflash£¨63£© ¶ÁÈ¡xmlºóµÄ¼òµ¥·ÖÒ³´¦Àí
Õâ¸ö¶«Î÷¹¦Äܼܺòµ¥£¬Ã»ÓÐʲô¼¼Êõº¬Á¿¡£Ö»ÊǼǼһÏ¡£
xml µÄÊý¾Ý»ñÈ¡ºó£¬¿ÉÒÔͨ¹ýÒ»¸ö¼òµ¥·ÖÒ³´¦ÀíÀ´Íê³É¼òµ¥·ÖҳЧ¹û¡£
1.ÀûÓÃÇóÓàºÍ³ý·¨µÄ·½·¨ÅжÏÒ³Êý
Õâ¸öÊÇÒ»¸ö±È½Ï³£¼ûµÄ×ö·¨£¬Ò²ÊÇÒ»ÖÖ°ì·¨¡£ÔÚÕâÀ²»¶ÔÕâÖÖ·ÖÒ³´¦ÀíÒª´ïµ½Ê²Ã´×îÓÅ»¯µÄЧ¹û½øÐÐÌÖÂÛ£¬ÕâÀïÖ»ÊÇ̽ÌÖÒ»ÖÖ°ì·¨¡£¶ÔһЩÊý¾ÝÁ¿²»´óµÄ×ö·¨£¬¿ÉÒÔ³¢ÊÔÒ»ÏÂÕâЩ¡£È»¶ø¶ÔÓÚ¹ý´óµÄÊý¾ÝÁ¿£¬ÔòÐèÒªÆäËû°ì·¨´¦Àí¡£ÎÒ¶ÔÊý¾Ý¿â²¢²»ÊìϤ£¬ÉõÖÁ¿ÉÒÔ˵ÔçÒѾÒÅÍüÁ˺ܶࡣ²»¹ý£¬ÀûÓÃÏÖÔÚµÄ×ÊÔ´´¦ÀíÒ»ÏÂÕâЩ»¹Ëã¿ÉÒÔ¡£
¼ÙÉ裬xml ÓÐ50ÌõµÄÐÅÏ¢£¬ÎÒÃÇÿһҳֻÊÇÏÔʾ10Ìõ£¬Ôò50/10=5;¼ÆËã³ö5Ò³¡£
¼ÙÉ裬xml ÓÐ51ÌõÐÅÏ¢£¬ÎÒÃÇÐèÒª½øÐзÖÒ³£¬Ã¿Ò»Ò³ÏÔʾ10Ìõ£¬Ôò51/10=5.....1(Óà1) ÔòÎÒÃÇÐèÒª·ÖÒ³ÊýΪ5+1=6Ò³¡£
¿ÉÒÔ¼ÙÉèÍƵ¼£¬µ±³ý¾¡µÄʱºò£¬ÈÝÒ×¼ÆËã³öÒ³Êý£¬µ±²»ÄܼÆËã³ö£¬ÎÒÃÇÔòͨ¹ýÇóÓàµÄ·½Ê½À´ÅжÏÊÇ·ñÇó¿ÉÒÔÕû³ý¡£ (Ò³Êý%2==0).
ÏÂÃæ¾ÍÊÇÒ»¸ö˼·¡£
if(×ÜÒ³Êý%2==0)
{
·ÖÒ³Êý=×ÜÒ³Êý/ÿһҳµÄÌõÊý
}
else
{
·ÖÒ³Êý=×ÜÒ³Êý/ÿһҳµÄÌõÊý+1£»
}
ÓÐÁËÕâ¸ö°ì·¨Ö®ºó£¬ÎÒÃÇдһ¸ö¼òµ¥ÀàʵÏÖÕâ¸ö¹¦ÄÜ¡£
package com.web
{
//·ÖÒ³Àà
public class Page
{
private var max:int;
private var pagenum:int;
private var currentPages:int;
public function Page()
{
}
//ÉèÖ÷ÖÒ³ÏîÊý
public function set MaxRow(max:int):void
{
this.max=max;
}
//»ñÈ¡·ÖÒ³ÏîÊý
public function get MaxRow():int
{
return max;
}
public function set currentPage(value:int):void
{
this.currentPages=value;
}
public function get currentPage():int
{
return currentPages;
}
//»ñÈ¡×ܵķÖÒ³Êý£¬ÀûÓÃÇóÓàµÄ·½Ê½ÅжÏÊDz»ÊÇÕûÒ³
public function getPageNumber(total:int):int
{
if (total%MaxRow==0)
{
pagenum=total/MaxRow;
} else
{
pagenum=int(total/MaxRow)+1;
}
return pagenum;
}
public function get TotalPage():int
{
return pagenum;
}
//ÏÔʾҳÂë
public function getPage():Str
Ïà¹ØÎĵµ£º
XmlDocument XMLFile = new XmlDocument();
XMLFile.Load(HttpContext.Cur ......
Ê×ÏÈÏÂÔØJDOM.JAR¼ÓÈëµÄclasspathÖÐ
package com.test.search;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.output.XMLOutputter;
public class ToXML {
public ......
ÔÚ¹¤×÷Öо³£Óöµ½µ½ÁíÍâÒ»¸ö·þÎñÆ÷¶ÁÈ¡Êý¾Ý£¬ÆäÖÐÒ»ÖÖ×î³£Óõķ½·¨£¬¾ÍÊÇÓÃxml½øÐÐÊý¾Ý´«µÝ£¬±ÈÈçA·þÎñÆ÷µ½B·þÎñÆ÷µÃµ½¶ÔÓ¦µÄxml¸ñʽµÄÊý¾Ý£¬AµÃµ½Ö®ºó½øÐнâÎö¡£Ò»°ãÕâÖÖ½âÎö·ÖΪDOM½âÎöºÍSAX½âÎö¡£ÕâÀï²»ÊÇ̽ÌÖDOMÓëSAX½âÎöµÄÇø±ðºÍÓŵ㣬ֻÊǽéÉÜÒ»¸öС¿ò¼Ü£¬ÊµÏÖJAVABeanºÍXMLµÄת»»£¬Éµ¹ÏʽµÄת»»¡£----- ......
ËäÈ»ÎÒ¶Ô³´¹ÉÐËȤ²»´ó£¬µ«ÊÇÎÒ¶ÔÀïÃæµÄÊý¾ÝºÍÓ¦Ó÷´¶øÓеãÐËȤ¡£Õâ¸öflash ÊÇ×î½üÎÞÒâÖп´µ½µÄ¡£Õâ¸öflash °æ±¾µÄ¹¦ÄܱȽÏÆëÈ«¡£Ò²ÊÇÒ»¸öÄѵõÄÓ¦Óá£
flash ÔÚÓ¦Óõ½½ðÈÚµÄÊý¾Ý·ÖÎöÉÏ£¬ÌرðµÄÊÇͼÐεķ½ÃæÓÐÒ»¶¨µÄÓÅÊÆËùÔÚ¡£Ôø¾¸ú±ðÈËÁĹýһϣ¬¿ª·¢½ðÈÚÉçÇøºÜ¶à³Ì¶ÈÉÏ»á¸úÕâЩÊý¾Ý»ñÈ¡ºÍÏÔʾ´ò½»µÀ¡£Ò²¾ÍÊÇ˵ ¶ ......