I am creating a table in Java using the Confluence storage format and XML-RPC. My table looks like this:
<table><tbody> <tr><th>Carrier</th><th>Number of Devices</th></tr> <tr> <td>Verizon</td> <td>6 (3.59%)</td> </tr> <tr> <td>Sprint</td> <td>2 (1.19%)</td> </tr> <tr> <td>AT&T</td> <td>6 (3.59%)</td> </tr> </tbody></table>
I get the following error, which I am sure is because of the "&" symbol in "AT&T":
Exception in thread "main" org.apache.xmlrpc.XmlRpcException: java.lang.Exception: com.atlassian.confluence.rpc.RemoteException: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '<' (code 60); expected a semi-colon after the reference for entity 'T'
How do I deal with this? I still want the "&" symbol to show up in my table in Confluence.
Community moderators have prevented the ability to post new answers.
Figured it out... Turns out that instead of just "&", you need "&".
Atlassian, you should have a page somewhere that lists all of the additional "escape" characters needed for special characters such as this. Or just update your storage format so that it is automatically taken care of.
Hi @Jacob Young - our documentation is located @ https://confluence.atlassian.com/display/DOC/Confluence+Storage+Format The storage format is XHTML-based, so the APIs will only accept well-formed, valid XML as input. The list of XML reserved characters is available online. Here's a good reference from Wikipedia, for example - https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.