t**d 发帖数: 6474 | 1
什么server?是不是server的模块不全? 我的lighttpd里面用ipkg list_installed显
示有如下模块安装。你的如果没有,就装上这些模块 (不一定要全装)。
expat - 2.0.1-1 - XML Parser library
fcgi - 2.4.0-2 - FastCGI is a language independent, scalable, open extension
to fontconfig - 2.5.0-0 -
freetype - 2.3.6-1 - Free truetype library
gconv-modules - 2.5-1 - Provides gconv modules missing from the firmware.
gdbm - 1.8.3-2 -
libcurl - 7.20.0-1 -
libdb - 4.2.52-3 - Berkeley DB Libraries
libgd - 2.0.35-5 -
libjpeg - 6b-3 - collection of jpeg tools
libpng - ... 阅读全帖 |
|
w****u 发帖数: 3147 | 2 parser好像有问题……
能拿到价格,其他都是empty |
|
|
m******a 发帖数: 2 | 4 hi there, i am a newbie in jave study. could somebody help me to figure out
this hw plz? i appreciate for any help in advance.
Write a parser that accepts this language, evaluates the expressions it is
given and stores the results in the appropriate registers. Your main class
should be called Calculator. The program should be run from the command line:
> java Calculator
Then the calculator will wait for keyboard input. After a line of input has
been entered, the program will check whether it is |
|
m******t 发帖数: 2416 | 5 The popularity of xml has multiple reasons:
1. technology wise, xml itself is a nice piece of technology.
The key point is it keeps
the data presentation in a very simple way, so simple that any system
that supports string manipulation can implement an xml parser.
The great benefits of this is it allows hetrogeneous systems to talk to
each other in an easy way.
2. politics wise, xml is a few only things that are supported by
almost all big players in this industry. The industry can't afford
to |
|
y***e 发帖数: 39 | 6 try javax.swing.text.rtf package.
RTF format is not complicated. Make sure what text you want to extract
and you can write a parser of your own easily I believe.
ALso search on Google.
If you can't find one or make one on your own, come back and perhaps
I'd try to write one for you.:-)
yerie |
|
m***r 发帖数: 29 | 7 I am now trying to extend Java. In addition to lexer and parser,
I need one function that can inference the type of expression
for java. Or, better if it can give the type range during parsing.
No other requirement. Any guru know such tools?
I checked JavaCC, SableCC, and some other tools, But can not find
such capability. Is there any third implementation based on such
CC tools, such as a Compiler-Compiler based full java compiler (in
which there must be such functions)? I say CC-based because |
|
D*******I 发帖数: 29 | 8 I'm not sure, but I think JavaCC has a visitor pattern where you can add
functions to each node on the parser tree.
I suggest you send a email to professor Jens p******[email protected], he's one
of the guys that knows more on this. |
|
c*****t 发帖数: 1879 | 9 Do you guys use ResourceBundle or XML parser to read application
configuartion? Strength and Weakness?
I tried to use XML to parse a config file and it seemed take a
lot more coding.
BTW, for AbstractAction, how to specify its name and icon (used
in menus and buttons) after its construction?
Thanks a lot. |
|
d******i 发帖数: 5 | 10 I am a Java beginner, doing homework to make a parser. I want to know how to
find the number of funciton pointers in Java file?
thanks, gao shou! |
|
O**n 发帖数: 133 | 11 google了一下,发现java有DOM, 还有一种叫SAX的。据说DOM不好。
哪位大虾介绍一下吧,他们有什么区别呢?
如果我想用来parse一个巨大的xml的file, ~500MByte,
应该用哪一个?怎么用呢?
//bow
多谢! |
|
st 发帖数: 1685 | 12 use SAX, which is single parse without building up the tree structure,
500M xml probably will bring DOM... (not enough memory)...
also, there are many many versions of DOM, SAX for java, check them
yourself. :D |
|
e***g 发帖数: 158 | 13 depends on what you want to do after parse. don't use SAX unless you
have to, it's more work. |
|
g*s 发帖数: 2277 | 14 or use JAXB to get flexibility of DOM and performance of SAX. |
|
e***g 发帖数: 158 | 15 is it mature/popular yet? haven't heard of it for a while.
well it may not fit, if he wants to search by xpath, or to modify xml.
there's is no THE solution, it depends on what he wants to do. |
|
g*s 发帖数: 2277 | 16 still not mature? I used it two years ago for content conversion. did not
pay attention afterwards.hehe |
|
w********c 发帖数: 2632 | 17 It's an issue of the context. SAX is used for simplicity and speed, while DOM
is used for flexibility. If ur source is scanned only once, which is true in
most massive data processing, SAX is good enuf. |
|
m**c 发帖数: 90 | 18
In general, if you are going to manipulate XML, you probably want to use DOM
so that you can insert/delete/update node in the DOM tree. If you are going
to parse XML only without any manipulation, you can use either DOM or SAX, but
SAX is faster comparing to DOM and uses less memory. In your case, you may
have to use SAX unless you have a lot memory.
DOM |
|
c*****t 发帖数: 1879 | 19 Not being able to compile greater than 64K byte code is really a problem
in certain applications. Mainly in the lexers and parsers where large
precomputed tables is stored and could easily exceed 64K. |
|
|
c*****t 发帖数: 1879 | 21 This is exactly the problem that I am facing. Unless that I write my own
specific parser, there seemed to be no way to do it. Too bad, my program
needs to be run on Windows, SGI and Mac :(
Boy, it is a pain in the rear to write it. |
|
j******r 发帖数: 201 | 22 actually my question is about parsing.
you can get the line and column number from the parser,
but you can not use subString to get the corresponding strings
because if these are tabs, the column number is not exactly the
position of the character in the string
for example:
"\t\tx=int;"
the column for x could be 8 or 4. but you should use subString(3,4?) to get "x",
but not (8,.)or (4,.). |
|
j******r 发帖数: 201 | 23 yes
if you have a string "\t\tx", and the length of tab is 4, the parser
i am using (javacc) will tell me the column number of 'x' is 8, not 3.
And the editor will show the column is 8 too.
Anyway, if I want to read a file, and display it in another terminal.
And I want the display is exactly as it is in the original one, i still need
to know the length of each '\t'. |
|
w*r 发帖数: 2421 | 24 I think you question is that you want to make a 'generic' plot package
which can take varioius forms of data.
I am working on my project by letting the chart/plot package accept the
XML form of data. Basically most of my plot is 2D plot, then I just define
the data as
.......
by letting this generic structure , you can write your parser to parse it
into your chart's data object, then you can draw
you are free to exten |
|
x***n 发帖数: 39 | 25 my guess is ur file operation takes long time.
post the snippet where you chop down the files into pieces. |
|
l***r 发帖数: 459 | 26 Sorry, I guess I didn't describe the problem clearly. The xml file looks like
this:
"NCBI_BlastOutput.dtd">
...
"NCBI_BlastOutput.dtd">
...
"NCBI_BlastOutput.dtd">
...
|
|
w*r 发帖数: 2421 | 27 okey, your xml file is not well formated for parsing. My suggestion is
that you can write a class to get rid of the all document head at the first
place and put all record well-formated [Cin one file(or stream).
Then what you need to do is just write a xslt to transform the
xml to whatever the format you want and parse it into your application. |
|
z****g 发帖数: 2497 | 28 不是一个chunk 一个chunk读的, 是
按顺序,或者说一行一行的读的。
DOM才是整个文件送进去。
明白? |
|
x***n 发帖数: 39 | 29 do u expect him to do a big project?
//btw, not ME does this project. |
|
g******a 发帖数: 730 | 30 好像有点怪:)
我以前的lexer使用Python写的
不想重新写了
如果能在java里用python的模块也行
多谢 |
|
|
|
|
z***y 发帖数: 42 | 34 javacc. (like LEX/YACC)
They have C grammar available. |
|
|
c*****s 发帖数: 214 | 36 没有"save as(complete)"那么简单。
对程序来说一个网页URL就是文本,一个从80端口受到的数据流。IE懂得读这个文本, 认
识里面的图片,连接等才知道要去别的URL下载图片,他还要足够聪明的把每个图片的连接
改成指向下载后的本地图片。
如果你要写程序做这件事,你的程序要懂得去解析html,认出里面的图片下载之。还要会
修改html把图片的url该成本地。搜索java html parser可以找到一些工具。
图简单的话可以找IE的COM,用VB写桌面程序调用。
。 |
|
c*****t 发帖数: 1879 | 37 I have a question regarding Jelly and other XUL or XAML tools on
error handling. Basically, how they do it.
1. how they handle parse errors. The errors are not syntactic ones
that XML parsers SAX/JDOM detect, but semantic ones like unknown
tags, invalid variables, invalid values, wrong attributes etc.
2. logging.
3. warning/debugging.
I am currently trying to come up a solution to improve CookXml
( cookxml.sourceforge.net )'s error handling, but it would be nice
to know how others doing |
|
b*e 发帖数: 3845 | 38 Hello. javax.xml.parsers defines the abstract class -
DocumentBuilderFactory. I'm trying to find an implementation of
this class. Specifically, I'm looking for the sun implementation.
Can anybody tell me which jar files in j2sdk1.4.2 contains sun's
implementation? Thanks. |
|
s*****n 发帖数: 57 | 39 client side forms? 我不需要它呀, 我自己这方不是一个webpage的形式. 我就是要写一
个程序到别的网页上取东西. 取来以后就和网页, html没有关系了. 我知道取下数据后,
要一个html parser来处理得到的数据(java有处理html的package吗?)
至于'servlet running on server side to retrieve the information you need', 那
是肯定有的吧, 不过和我应该没关系? 平常我是用browser去输入关键词, 搜索东西的.
现在就是要写个程序去做罢了.
我知道从socket做起来, 挺复杂, 有没有简单一点的办法呢? 比如用HttpURLConnection
class, 大概就比socket层级高一点, 简单一些? |
|
s*****n 发帖数: 57 | 40 client side forms? 我不需要它呀, 我自己这方不是一个webpage的形式. 我就是要写一
个程序到别的网页上取东西. 取来以后就和网页, html没有关系了. 我知道取下数据后,
要一个html parser来处理得到的数据(java有处理html的package吗?)
至于'servlet running on server side to retrieve the information you need', 那
是肯定有的吧, 不过和我应该没关系? 平常我是用browser去输入关键词, 搜索东西的.
现在就是要写个程序去做罢了.
我知道从socket做起来, 挺复杂, 有没有简单一点的办法呢? 比如用HttpURLConnection
class, 大概就比socket层级高一点, 简单一些?
有没有一些现成的sample code呢? |
|
|
c*****t 发帖数: 1879 | 42 ft, there is no package, just an idea, since everything must be tightly
integrated. If you really want to take a look how I implemented mine,
google CookXml, an XML parser, but I don't think you will be interested
reading it. |
|
p***p 发帖数: 559 | 43 yes, normally the server is based on a protocol stack. SIP server on SIP
stack ...
Tomcat and Jetty parser the TCP/UDP payload himslef instead using a stack
with interface. |
|
m******t 发帖数: 2416 | 44 Unless the web page I was looking at was an illusion, 8-), the only thing it
requires that's not included is an XML parser, which should have been part
of JDK 5. |
|
c*****t 发帖数: 1879 | 45 I am writing a program which needs to extract JavaDoc comments from
given source files. The thing is, I need to do it dynamically, like
showing the comment as a tooltip etc.
I know Eclipse/IntelliJ IDEA have the feature, I am wondering how
they did it, since I need to do the same for my program. I certainly
do not wish to write my own Java parser.
Any pointers? Thanks. |
|
c*****t 发帖数: 1879 | 46 nvm, I got it solved. The question was basically related to
Running the Standard Doclet Programmatically
http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/standard-doclet.html#runningprogrammatically
which solved my problems. I can now get all the information within
the same JVM. Call JavaDoc multiple times as well... and suppress
warnings/errors.
What's so cool is that now I can write my own doclet for custom XML
parsers created using CookXml. The doclet generates a JavaDoc like
web page |
|
A**o 发帖数: 1550 | 47 another workaround i was thinking this afternoon was:
make js an extension that will pass over to your JSP parser in the web.xml.
it's hack, i must say.
mentioned |
|
t*********g 发帖数: 23 | 48 request.getInputStream()
then use a XML parser parse the InputStream |
|
n*w 发帖数: 41 | 49 I remember that htmlparser is not very good. If you just want to extract
some information for specific tags, just wrote your own by using some
classes in standard java library. |
|
|