create Dataset from xml

M

Mr. M

Hi!

I Have de following problem...
I must call a web service, which returns a xml string, that i must to
process it and create a DataSet, using the readXml function:
myDataSet.ReadXml(strReader, XmlReadMode.InferSchema).

the xml have the following format:

<Results>

<Document relevance="56" xmlns="urn:Microsoft.Search.Response.Document">

<Title>XXX</Title>

<Action>

<LinkUrl fileExt="doc" size="204800">HTTP://xxx</LinkUrl>

</Action>

<Description>DESCRIPTION X</Description>

<Date>2003-09-26T19:33:08</Date>

<Properties xmlns="urn:Microsoft.MSSearch.Response.Document.Document">

<Property>

<Name>DAV:href</Name>

<Type>String</Type>

<Value>HTTP://yyyyy</Value>

</Property>

<Property>

<Name>DAV:displayname</Name>

<Type>String</Type>

<Value>HOLA</Value>

</Property>

</Properties>

</Document>

</Result>

The problem is that after I've created the DataSet, when i search in
DataTables for columns "DAV:displayname", or "DAV:href", these are not
found.

Anyone could give me any pointers???

Thanks!

M.-
 
M

Miha Markic

Hi,

First thing you have tag mistmatch <Results> </Result>.
Next, there is a table with index 4 (5th table in dataset) that has a column
Name.
The row 0 of this table contains value DAV:href in the column Name.
The row 1 of this table contains value DAV:displayname in the column Name.
ds.Tables[4].Rows[0]["Name"]


HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top