Groups | Blog | Home
all groups > dotnet xml > june 2004 >

dotnet xml : XPath expression with namespace


KB
6/4/2004 11:32:20 AM
Hello

I am trying to use SelectSingleNode in an XMLDocument for a node that
has namespace defined. My problem is the XPath for the node with no
namespace defined works as soon as I put namespace it returns nothing.

Help
KB
6/4/2004 1:46:48 PM
This is the sample document... I am trying to create expression to read
ObjectName node and Data node.
Thanks
KB

<?xml version="1.0" standalone="yes"?>
<!--Comment If Any-->
<SynchronizationObjectsDocument
xmlns="http://www.xyz.com/someapp/synchronization">
<ApplicationArea xmlns="http://www.xyz.com/someapp">
<DocId>e8ff008b-806c-4a34-8a82-ccf2bb0e47a2</DocId>
<CreationDateTime>2004-05-13T21:29:13-04:00</CreationDateTime>
<Receiver>
<DbId>DB001</DbId>
<OrgCode>GLOBAL</OrgCode>
<Operation>SYNCHRONIZATION</Operation>
<ObjectName>Part</ObjectName>
<OnError>Skip</OnError>
<Application>Someapp</Application>
<Module>MasterSetup</Module>
</Receiver>
<Comments />
</ApplicationArea>
<Data>
<V_PRT_PARTS>
<V_PRT_PART>
<PRD_CODE>PART1</PRD_CODE>
<PRD_NAME>PART NAME 1</PRD_NAME>
<PRL_PRD_CODE>PRODUCTLINE</PRL_PRD_CODE>
<UNT_CODE>Ea</UNT_CODE>
<PRD_UNIT_COST>1</PRD_UNIT_COST>
</V_PRT_PART>
<V_PRT_PART>
<PRD_CODE>PART2</PRD_CODE>
<PRD_NAME>PART NAME 2</PRD_NAME>
<PRL_PRD_CODE>PRODUCTLINE</PRL_PRD_CODE>
<UNT_CODE>Ea</UNT_CODE>
<PRD_UNIT_COST>2</PRD_UNIT_COST>
</V_PRT_PART>
</V_PRT_PARTS>
</Data>

</SynchronizationObjectsDocument>
[quoted text, click to view]
nospam NO[at]SPAM online.microsoft.com (
6/4/2004 5:06:41 PM
Can you post your sample so we can take a look at it?

Thanks,
Hoang Nguyen
--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the
terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread
from which they originated.

--------------------
[quoted text, click to view]

AddThis Social Bookmark Button