Xml encoding

73 views
Skip to first unread message

dyuti

unread,
May 28, 2008, 6:52:04 AM5/28/08
to AdWords API Forum
We are downloading Keyword performance report in XML format through
API. Some of the XML file has "<?xml version="1.0" standalone="yes"?>"
written at the top line, some has <?xml version="1.0" encoding="UTF-8"?
>.

We are facing some problem in linux because of <?xml version="1.0"
standalone="yes"?>.
Is there any way we can specify that all the XML file will have <?xml
version="1.0" encoding="UTF-8"?>.

AdWords API Advisor

unread,
May 28, 2008, 11:21:44 AM5/28/08
to AdWords API Forum
Hello,

What problem are you running into, exactly? Both XML declarations
should be handled by most XML parsers.

We can dig deeper into why you might be seeing different XML
declarations if this is a problem that can't be worked around, but it
would probably be more productive to deal with whatever parser issue
you're having.

Cheers,
-Jeff Posnick, AdWords API Team

Dyutiman Chaudhuri

unread,
May 30, 2008, 8:50:31 AM5/30/08
to adwordsa...@google.com, AdWords API Forum
ok, its not exactly an XML parser, I am running a tool which takes the XML file as input, transform its data and put it into database. 
For those files which has written 'encoding="UTF-8"' are working perfectly, other fails. 
May that tool has a problem in parsing XML but we cant change its source code. So if I can get all the XML files with 'encoding="UTF-8"' written then my problem would be solved.

AdWords API Advisor

unread,
May 30, 2008, 10:43:22 AM5/30/08
to AdWords API Forum
Hello Dyutiman,

Well, there's definitely an XML parser in the picture here, since
something is converting the XML into a in-memory structure that is
being written to the database. But if you're not sure what the
underlying parser is or how to swap it out for a version that doesn't
exhibit those symptoms, that's okay.

How about just taking a look at the first line of text in the XML
report you download and if it's something that you think your program
can't handle, change the text on your end to something that is known
to work?

Cheers,
-Jeff Posnick, AdWords API Team


On May 30, 8:50 am, "Dyutiman Chaudhuri"
<dyutiman.chaudh...@gmail.com> wrote:
> ok, its not exactly an XML parser, I am running a tool which takes the XML
> file as input, transform its data and put it into database. For those files
> which has written 'encoding="UTF-8"' are working perfectly, other fails.
> May that tool has a problem in parsing XML but we cant change its source
> code. So if I can get all the XML files with 'encoding="UTF-8"' written then
> my problem would be solved.
>
> On Wed, May 28, 2008 at 8:51 PM, AdWords API Advisor <
>
Reply all
Reply to author
Forward
0 new messages