Error parsing XML: The reference to entity "documentId" must end with the ';' delimiter.

1,051 views
Skip to first unread message

James

unread,
May 6, 2010, 4:43:24 PM5/6/10
to Google Web Toolkit
I am using UiBinder. I have an Anchor in the XML file and when I
assign a URL to the href attribute that contains the string
"documentId" I get the "Error parsing XML" error (something like
<g:Anchor href='http://www.somewhere.com/documentId'></g:Anchor>).
Compiling with debug output reveals that it is a SAXParseException
causing the problem. Here is a partial stack trace of the error:


org.xml.sax.SAXParseException: The reference to entity "documentId"
must end with the ';' delimiter.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:
174)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
388)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:
1414)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:
868)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:
460)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:
277)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:
648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:
140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:
510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:
107)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:
225)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:
283)
at
com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:
93)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:
147)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:
124)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:
105)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
418)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
38)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:108)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:54)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
154)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
119)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
531)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
414)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)

Any help is appreciated.

James

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Thomas Broyer

unread,
May 7, 2010, 5:17:13 PM5/7/10
to Google Web Toolkit


On May 6, 10:43 pm, James <dreamten...@gmail.com> wrote:
> I am using UiBinder. I have an Anchor in the XML file and when I
> assign a URL to the href attribute that contains the string
> "documentId" I get the "Error parsing XML" error (something like
> <g:Anchor href='http://www.somewhere.com/documentId'></g:Anchor>).
> Compiling with debug output reveals that it is a SAXParseException
> causing the problem.  Here is a partial stack trace of the error:
>
> org.xml.sax.SAXParseException: The reference to entity "documentId"
> must end with the ';' delimiter.

Are you sure it's not href="http://www.somewhere.com/blah?
foo=bar&documentId=baz" ? '&' has to be written as &amp; in XML (as
well as in HTML FWIW)

James

unread,
May 8, 2010, 11:18:36 AM5/8/10
to Google Web Toolkit
You are right. I wish the error was a little more informative! :)

James

On May 7, 2:17 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On May 6, 10:43 pm, James <dreamten...@gmail.com> wrote:
>
> > I am using UiBinder. I have an Anchor in the XML file and when I
> > assign a URL to the href attribute that contains the string
> > "documentId" I get the "Error parsing XML" error (something like
> > <g:Anchor href='http://www.somewhere.com/documentId'></g:Anchor>).
> > Compiling with debug output reveals that it is a SAXParseException
> > causing the problem.  Here is a partial stack trace of the error:
>
> > org.xml.sax.SAXParseException: The reference to entity "documentId"
> > must end with the ';' delimiter.
>
> Are you sure it's not href="http://www.somewhere.com/blah?
> foo=bar&documentId=baz" ? '&' has to be written as &amp; in XML (as
> well as in HTML FWIW)
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.To post to this group, send email togoogle-w...@googlegroups.com.To unsubscribe from this group, send email togoogle-web-too...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages