cancel
Showing results for 
Search instead for 
Did you mean: 

XML creation

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Joe

Have you tried removing


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

from the return string and see if it works?

Charles