473,396 Members | 1,859 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,396 software developers and data experts.

XPath - How do i select attribute xsd:string?

Hi there,

I need to select all attribute nodes with value "xsd:string" using XPath.
The input document is an XML Schema, e.g.:

...
<xsd:element type="xsd:string">
...

Node 'xsd:element' is actually in the XML Schema namespace (prefix "xsd"
maps to "http://www.w3.org/2001/XMLSchema"), so this XPath expression:

//node()[namespace-uri()="http://www.w3.org/2001/XMLSchema"]

selects node "xsd:element". So far so good.

But, how do i select the attribute "type"? This attribute is not in the XML
Schema namespace but when i use the "xsd" prefix the XPath processor thinks
i am referencing the XML Schema namespace.

Any ideas? Thanks.

- Gerben
Oct 13 '06 #1
1 2105
In article <45***********************@news.wanadoo.nl>,
Gerben Abbink <no*****@no.mailwrote:
>But, how do i select the attribute "type"? This attribute is not in the XML
Schema namespace but when i use the "xsd" prefix the XPath processor thinks
i am referencing the XML Schema namespace.
So don't use the prefix xsd! Just use @type to get the attribute.

-- Richard
Oct 13 '06 #2

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

Similar topics

4
by: R.G. Vervoort | last post by:
Does anyone have a suggestion how I can order a list with names in a secondary select string. The first string selects a number of locations where people work From this string I get...
1
by: Alastair Cameron | last post by:
VB6, MSXML 3.2 installed: Q1. I am having a problem selecting nodes with XPATH expressions when an attribute values contain backslashes (\\) in as part of its value: For example the...
8
by: johnsocs | last post by:
How do you validate the following XML document, I'm having problems with element 'one' with the attribute xsi:type="xsd:string" <?xml version="1.0" encoding="UTF-8"?> <zero...
8
by: Jacob Arthur | last post by:
How would I go about using a custom select string that is passed from a form to the SelectCommand parameter of SqlDataSource? I tried: SelectCommand = "<% Request.Form("hdnSelect") %>" but I...
3
by: Doug | last post by:
Hi I posted an hour ago from a different pc - about calling a form from another form. now i am having trouble passing the value from a text box (called tb.entryData), from the form called...
1
by: Kevin Burton | last post by:
I have a set of XSD's that I would like to build some classes from. When I run the xsd tool I get a warning that the following is not "legal": <xsd:restriction base="xsd:string"> I have seen...
1
by: dermardv | last post by:
I am trying to get the select string from vb.net 2005 designer generated ADO Objects. Let's say I create a new data source using the IDE which creates a dataset named TestDataSet, which in turn...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.