Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

XML creation

Hi,

I am new to Xcelsius and have been trying to build a web service to return an xml document to Xcelsius. The xml document is created using linq to sql and builds the document as the sample below. The web method is also reproduced. I suspect the problem is that the document is returned as a string rather than an Xdocument, Does anyone have experience of this method, could you correct my web method so that it will return the XML as a document rather than a string?

Sample returned:

<string => <?xml version="1.0" encoding="utf-8"?>

<Data>

<variable name="Turnover">

<Row>

<column>Central</column>

<column>12345</column>

</Row>

<Row>

<column>North East</column>

<column>12345</column>

</Row>

<Row>

<column>North West</column>

<column>12345</column>

</Row>

<Row>

<column>North CentralW</column>

<column>12345</column>

</Row>

<Row>

<column>South East</column>

<column>12345</column>

</Row>

<Row>

<column>South West</column>

<column>12345</column>

</Row>

</variable>

</Data>

</string>

Web method:

<WebMethod()> _

Public Function ReportDataTurnover() As String

Dim DB As New ReportsDataContext

Dim masterRep = <Data>

<variable name="Turnover">

<%= From Turnover In DB.Turnovers _

Select <Row>

<column><%= Turnover.Depot %></column>

<column><%= Turnover.Turnover %></column>

</Row> %>

End Function

Not what you were looking for? View more on this topic or Ask a question