Hi Thomas
Actually, I did not understand what you mean by:
You might also have to capture the return value into an
ECMAScript variable and then look up that variable from Java.
I tried this:
Node n = (Node)in.evaluate("parseXML('"+xml+"',"+doc+")");
doc.getDocumentElement().appendChild(n);
But it does not work:
SyntaxError: unterminated string literal (<SVG>; line 1)
at
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at
org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)
at org.mozilla.javascript.TokenStream.getToken(TokenStream.java:967)
at org.mozilla.javascript.TokenStream.matchToken(TokenStream.java:634)
at org.mozilla.javascrsipt.Parser.argumentList(Parser.java:1144)
at org.mozilla.javascript.Parser.memberExprTail(Parser.java:1240)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1204)
Kind Regards
BadrEddine
From: Thomas DeWeese <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: adding svg code to SVGDocument
Date: Thu, 07 Jul 2005 08:02:36 -0400
Hi Badreddine,
badreddine lakhlifi wrote:
I did exactly what you said, but it does not work, the message i got is
the following:
org.apache.batik.script.InterpreterException: invalid argument count
(<SVG>; line 1)
at org.apache.batik.script.rhino.RhinoInterpreter.evaluate(Unknown
Source)
Sorry parseXML takes two arguments, the second is the document
to parse 'into':
Node n = (Node)in.evaluate("parseXML('"+xml+"', document)");
Node n = (Node)in.evaluate("parseXML('"+xml+"')");
doc.getDocumentElement().appendChild(n);
You might also have to capture the return value into an
ECMAScript variable and then look up that variable from Java.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Bénéficiez de 250 Mo de stockage avec MSN Hotmail http://g.msn.fr/FR1001/866
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]