473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Xpath request Pb

sda
Hi,

I get a XML content from a web services:
************************************************
<List DocTemplateUrl="DIEITIC/Forms/template.doc"
DefaultViewUrl="/dgafeie/DIEITIC/Forms/AllItems.aspx"
ID="{8DB24F59-1883-482F-9F6A-4158F3FD4747}" Title="DIE-I-TIC" .....
ShowUser="True" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Fields>
<Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID"
DisplayName="ID" FromBaseType="TRUE" />
<Field ColName="tp_Created" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Created" DisplayName="Date de création"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field ColName="tp_Author" ReadOnly="TRUE" Type="User" List="UserInfo"
Name="Author" DisplayName="Créé par" FromBaseType="TRUE" />
<Field ColName="tp_Modified" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Modified" DisplayName="Dernière modification"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field
ColName="tp_...................................... .................................................. ..
************************************************
I try to request this content :
************************************************

// Web Service call

ListsService.Lists ls = new ListsService.Lists();

ls.Credentials = System.Net.CredentialCache.DefaultCredentials;

XmlNode ndListColumns = ls.GetList(ListGUID);

// Parse XML

XPathNavigator nav = ndListColumns.CreateNavigator();

XPathNodeIterator xni = nav.Select("/List/Fields/Field");

.................................................. ........

************************************************

I have no results with the XPathNodeIterator (null). I tried several
expressions in
the select command, but it's the same thing. (There is accent in the XML
content, Pbs ?)
Any suggestions?

Thanks

SDA
Nov 12 '05 #1
2 1374


sda wrote:

I get a XML content from a web services:
************************************************
<List DocTemplateUrl="DIEITIC/Forms/template.doc"
DefaultViewUrl="/dgafeie/DIEITIC/Forms/AllItems.aspx"
ID="{8DB24F59-1883-482F-9F6A-4158F3FD4747}" Title="DIE-I-TIC" .....
ShowUser="True" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Fields>
<Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID"
DisplayName="ID" FromBaseType="TRUE" />
<Field ColName="tp_Created" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Created" DisplayName="Date de création"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field ColName="tp_Author" ReadOnly="TRUE" Type="User" List="UserInfo"
Name="Author" DisplayName="Créé par" FromBaseType="TRUE" />
<Field ColName="tp_Modified" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Modified" DisplayName="Dernière modification"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field
ColName="tp_...................................... .................................................. ..
************************************************
I try to request this content :
************************************************

// Web Service call

ListsService.Lists ls = new ListsService.Lists();

ls.Credentials = System.Net.CredentialCache.DefaultCredentials;

XmlNode ndListColumns = ls.GetList(ListGUID);

// Parse XML

XPathNavigator nav = ndListColumns.CreateNavigator();

XPathNodeIterator xni = nav.Select("/List/Fields/Field");

.................................................. .......

************************************************

I have no results with the XPathNodeIterator (null).


The elements are in the default namespace so your XPath expression needs
to use a prefix bound to the namespace URI, see
<http://www.faqts.com/knowledge_base/view.phtml/aid/34022/fid/1753>
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
sda
Resolved
Thanks a lot.

"Martin Honnen" <ma*******@yahoo.de> a écrit dans le message de news:
%2****************@TK2MSFTNGP15.phx.gbl...


sda wrote:

I get a XML content from a web services:
************************************************
<List DocTemplateUrl="DIEITIC/Forms/template.doc"
DefaultViewUrl="/dgafeie/DIEITIC/Forms/AllItems.aspx"
ID="{8DB24F59-1883-482F-9F6A-4158F3FD4747}" Title="DIE-I-TIC" .....
ShowUser="True" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Fields>
<Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID"
DisplayName="ID" FromBaseType="TRUE" />
<Field ColName="tp_Created" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Created" DisplayName="Date de création"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field ColName="tp_Author" ReadOnly="TRUE" Type="User"
List="UserInfo" Name="Author" DisplayName="Créé par" FromBaseType="TRUE"
/>
<Field ColName="tp_Modified" Hidden="TRUE" ReadOnly="TRUE"
Type="DateTime" Name="Modified" DisplayName="Dernière modification"
StorageTZ="TRUE" FromBaseType="TRUE" />
<Field
ColName="tp_...................................... .................................................. ..
************************************************
I try to request this content :
************************************************

// Web Service call

ListsService.Lists ls = new ListsService.Lists();

ls.Credentials = System.Net.CredentialCache.DefaultCredentials;

XmlNode ndListColumns = ls.GetList(ListGUID);

// Parse XML

XPathNavigator nav = ndListColumns.CreateNavigator();

XPathNodeIterator xni = nav.Select("/List/Fields/Field");

.................................................. .......

************************************************

I have no results with the XPathNodeIterator (null).


The elements are in the default namespace so your XPath expression needs
to use a prefix bound to the namespace URI, see
<http://www.faqts.com/knowledge_base/view.phtml/aid/34022/fid/1753>
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: K.Strunk | last post by:
Hi! I have a problem signing a XML-document. I need to sign a subnode of a document. So I need to refer to this subnode from within my signature. But how can I do that with XPath? I tried the...
0
by: Thor W Hammer | last post by:
Is it possible to use dynamic xpath expressions with the <%#XPath("..")%> syntax and XmlDataSource? This is a couple of examples to illustrate what I think about: 1: <%#XPath("*")%> 2:...
2
by: xerj | last post by:
I've worked out how to retrieve a parameter from a query string in a url using Request.Querystring("whatever"). However, what I can't figure out is how to feed this into an Xpath expression. For...
14
by: Mat| | last post by:
Hello :-) I am learning XPath, and I am trying to get child nodes of a node whose names do *not* match a given string, e.g : <dummy> <example> <title>Example 1</title> <body>this is an...
3
by: 0to60 | last post by:
Please help! I'm using the following code to get an XML doc: string str = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=12345&city=addison"; System.Net.HttpWebRequest request =...
1
by: newToAjax | last post by:
I have created an ajax application which retrievs an xml file and fills in the tab fields on the form.The code works fine in IE while its does not in Mozilla. Can you please let me know if i have to...
2
by: Amar | last post by:
I have XML Data: <REQUEST> <PARAMETERS> <PPM Name="CCCS Filed Date" value="xxxx"></PPM> </PARAMETERS> <RECORD _FiledDate="12/15/2003"></RECORD> </REQUEST>
0
by: bruce | last post by:
valid point...!! here's the test python.. ugly as it is!! Lodge It New All About ? Paste #83093
1
by: bruce | last post by:
Hi. Got a test web page, that basically has two "<html" tags in it. Examining the page via Firefox/Dom Inspector, I can create a test xpath query "/html/body/form" which gets the target form for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.