I would expect Gephi GML loader would admit scientific notations, but it doesn't. Scientific notation is prescribed in the GML official specification (see page 2):
Imported from Launchpad using lp2gh.
Fix issue #300 on GML import to support scientific notation
I merged your patch manually, thanks!
The important part is just changing new Double() to Double.valueOf(), right?
One problem with the merged code is that it uses a String and += operator as a string buffer. But that is very inneficient. StringBuilder should be used.
No it's not so simple because of the parser of StringTokenizer:
I agree the current solution is not efficient, but it works. I'll improve it using a StringBuilder.
Oh I see, I didn't know that problem of StreamTokenizer.
No the important change is how to detect "6.870900696337445E-4" as a Double.
Before with StreamTokenizer, we had "6.870900696337445" as a Double and "E-4" as a String.
But you are right, it should be better to use StringBuilder. I didn't think to use it.