Dolda2000 GitWeb
/
jsvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
816cbb0
)
Corrected the parser's attribute handling.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 16 Nov 2009 16:41:09 +0000
(17:41 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 16 Nov 2009 16:41:09 +0000
(17:41 +0100)
src/dolda/jsvc/next/Parser.java
patch
|
blob
|
blame
|
history
diff --git
a/src/dolda/jsvc/next/Parser.java
b/src/dolda/jsvc/next/Parser.java
index
b896749
..
ffbaf88
100644
(file)
--- a/
src/dolda/jsvc/next/Parser.java
+++ b/
src/dolda/jsvc/next/Parser.java
@@
-36,16
+36,6
@@
public class Parser {
return(doc.createElementNS(null, name));
}
return(doc.createElementNS(null, name));
}
- protected Attr makeattr(Document doc, Element el, String name, String val) {
- Attr a = doc.createAttributeNS(el.getNamespaceURI(), name);
- a.setValue(val);
- return(a);
- }
-
- protected Attr makeattr(Document doc, Element el, String name) {
- return(doc.createAttributeNS(el.getNamespaceURI(), name));
- }
-
protected String name(State s) throws IOException {
StringBuilder buf = new StringBuilder();
while(true) {
protected String name(State s) throws IOException {
StringBuilder buf = new StringBuilder();
while(true) {
@@
-75,7
+65,7
@@
public class Parser {
}
protected Attr attribute(State s, Element el) throws IOException {
}
protected Attr attribute(State s, Element el) throws IOException {
-
String nm = name(s
);
+
Attr a = s.doc.createAttributeNS(null, name(s)
);
s.in.peek(true);
int c = s.in.read();
if(c != '=')
s.in.peek(true);
int c = s.in.read();
if(c != '=')
@@
-98,7
+88,8
@@
public class Parser {
buf.append((char)s.in.read());
}
}
buf.append((char)s.in.read());
}
}
- return(makeattr(s.doc, el, nm, buf.toString()));
+ a.setValue(buf.toString());
+ return(a);
}
protected Element element(State s) throws IOException {
}
protected Element element(State s) throws IOException {