I’m using Piwik for the first time and want to integrate into my app via the API. I have everything setup and running and have made some successful calls to the API.
When I make the following call, I get XML Parsing Error: not well-formed. It doesn’t like the date being the node name. How can I fix this?
Aside from the question, I wrote a wrapper for my programming language and it uses a global method to send and parse the response into strongly typed objects. In my wrapper, you submit your list of queries, hence why the getBulkRequest was used. Do you have a recommendation or good reason to not use getBulkRequest with only one query?
Also, I noticed the XML is returned and I can see it by viewing the source of the page. Even though the page shows this error:
This page contains the following errors:
error on line 5 at column 5: StartTag: invalid element name
Below is a rendering of the page up to the first error
The json format does indeed work. However, I prefer to work with xml as I find it more pleasurable, especially when using server side languages. I decided to take a look at the source and found that I needed to change the “renderArray($array, $prefixLines)” function inside of the xml data table renderer class and comment out the following lines:
This change results in valid xml and I do not see any side effects to this modification, except for I have to read the key attributes instead of the name, but as far as functionality, it seems to work. Please let me know if you do.