Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Full xpath support in visual basic?

Hi,

In an excel 2003 VB application I address data using XPath. I'm using
filters in the XPath expression, however I'm disturbed to see that filters
only works at last node in an expressions like

"/root/foo/bar[@no='5']"

and do not work in this expression

"/root/foo[@no='5']/bar"

Some of my code looks like this:

Set xp = ActiveSheet.Range("j32").XPath
xp.SetValue ActiveWorkbook.XmlMaps(mymapname),
"/pipe-int/pipe_design/cross_sectional_design/layers/layer[@no='14']/outer_diameter"

Is it correct that filters are only supported at last node, I really can't
imagine this but I've tried different setups that support this question. Am I
missing some dll's or do you have any idea of what could be wrong?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Full xpath support in visual basic?

Jesper,
Not that I know anything about XPath, but:
http://msdn.microsoft.com/library/en...03XMLIntro.asp
<Quote
An optional filter can be expressed at the end of the xpath.
Example: "/ns1:root/ns1:row/ns1:column1[@foo='abc']" is supported but not
"/ns1:root/ns1:row[@foo='abc']/ns1:column1"
</Quote

NickHK

"Jesper" wrote in message
...
Hi,

In an excel 2003 VB application I address data using XPath. I'm using
filters in the XPath expression, however I'm disturbed to see that filters
only works at last node in an expressions like

"/root/foo/bar[@no='5']"

and do not work in this expression

"/root/foo[@no='5']/bar"

Some of my code looks like this:

Set xp = ActiveSheet.Range("j32").XPath
xp.SetValue ActiveWorkbook.XmlMaps(mymapname),

"/pipe-int/pipe_design/cross_sectional_design/layers/layer[@no='14']/outer_d
iameter"

Is it correct that filters are only supported at last node, I really can't
imagine this but I've tried different setups that support this question.

Am I
missing some dll's or do you have any idea of what could be wrong?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Full xpath support in visual basic?

Thank you Nick,

Does anyone know why MS has chosen this stripped down xpath parser?

regard Jesper.

"NickHK" wrote:

Jesper,
Not that I know anything about XPath, but:
http://msdn.microsoft.com/library/en...03XMLIntro.asp
<Quote
An optional filter can be expressed at the end of the xpath.
Example: "/ns1:root/ns1:row/ns1:column1[@foo='abc']" is supported but not
"/ns1:root/ns1:row[@foo='abc']/ns1:column1"
</Quote

NickHK

"Jesper" wrote in message
...
Hi,

In an excel 2003 VB application I address data using XPath. I'm using
filters in the XPath expression, however I'm disturbed to see that filters
only works at last node in an expressions like

"/root/foo/bar[@no='5']"

and do not work in this expression

"/root/foo[@no='5']/bar"

Some of my code looks like this:

Set xp = ActiveSheet.Range("j32").XPath
xp.SetValue ActiveWorkbook.XmlMaps(mymapname),

"/pipe-int/pipe_design/cross_sectional_design/layers/layer[@no='14']/outer_d
iameter"

Is it correct that filters are only supported at last node, I really can't
imagine this but I've tried different setups that support this question.

Am I
missing some dll's or do you have any idea of what could be wrong?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Help Duncan Smith Excel Programming 0 December 3rd 04 03:04 PM
Visual Basic Help Baranya Péter Excel Programming 2 June 16th 04 08:09 PM


All times are GMT +1. The time now is 09:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"