XMLException with Google AdWords API



So I am trying to use the mutate method of ad group service and cannot resolve an issue I am having with it. Whenever the line



retVal = adGroupService.mutate(operations.ToArray());


[where



operations = new List<AdGroupOperation>();


]


is called, I get the following error message



An exception of type 'System.Xml.XmlException' occurred in
System.Xml.dll but was not handled in user code

Additional information: Data at the root level is invalid. Line 1, position 1.


Immediately before the above line, I have placed the code



XmlDocument doc = new XmlDocument();
doc.Load(@"file-path");


to test whether there if a problem with my web.config, which is where the application is getting the relevant AdWords settings, eg the Developer Token. This loads no problem, and I can breakpoint and check 'doc', and all is in order.


Does anyone have any suggestions? I am working in C# if that is at all helpful. Please let me know if further details are needed.


Thanks, Conor


No comments:

Post a Comment