Can't Access Sub-nodes With XPath Expression?

Aug 12, 2010

Trying to figure out XPath and I have successfully create an XPathExpression that lets me grab the events, but any nested sub groups seem to be unavailable to the query, I can get all the children on the Events group, but the LocationName field I can not access.[code]...

View 1 Replies


ADVERTISEMENT

C# - XPath: Select All A Nodes And All B Nodes That Are Not Inside An A Node?

Mar 28, 2009

Is the following possible in one XPath expression (see sample below) Select all (span tags of class msg) AND all ((img tags that have a non-empty alt attribute) AND (are NOT located inside a span tag of class msg))

[Code]...

View 1 Replies

Selecting XML Nodes Using XPath Syntax

Nov 9, 2011

Given the xml below why does the first selectsinglenode call not work but the second one does? Are the single quotes specifying a string type or something?
Dim dbglvlnode As Xml.XmlNode = doc.SelectSingleNode(String.Format("Config/Scanner[DeviceID = '{0}']/DebugLevel", XMLstuff.DeviceID))
Dim dbglvlnode As Xml.XmlNode = doc.SelectSingleNode(String.Format("Config/Scanner[DeviceID = {0}]/DebugLevel", XMLstuff.DeviceID))
<?xml version="1.0" standalone="yes"?>
[Code] ......

View 1 Replies

Use XPath To Navigate - Traversing The Nodes

May 12, 2011

The xml document is like so: ... I would like to use XPath to Navigate but I am not sure where to get started. Can anyone point me to some examples of traversing the nodes? I have the first part figured out but not sure how to iterate through all l1,l2,l3,l1 nodes...

[Code]...

View 2 Replies

Xpath - LINQ To XML Sum Child Nodes In .NET?

Nov 1, 2011

I have the following XML from Amazon's Marketplace API. I need to sum all the values of Item/ItemPrice/Component[type='Principal']/Amount for all Items to compute an order total. Is this possible to do using LINQ to XML in VB.NET?

<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>

[code]....

View 1 Replies

C# - Identify Duplicate Nodes In XPath 1.0 Using A XPathNavigator To Evaluate?

Jun 27, 2012

I am trying to identify duplicate serial numbers from the following xml using XPath 1.0 and then evaluating it in .Net using an XPathNavigator.

<?xml version="1.0" encoding="utf-16"?>
<Inventory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Items>

[code]....

I tried to do this by evaluating this

//Items/Item/SerialNumber

expression in a custom XSLT Context Function (implementing IXsltContextFunction like this MSDN example) in .Net but the Invoke function gets called one result at a time so I have no visibility of the other results to find duplicates.

1) Is there a way of doing this using a single XPath 1.0 expression?

2) Is there a way of passing in an array of elements into a single Invoke call of the custom XSLT Context Function class? I'm working in VB.Net but am happy with any C# examples anyone can share.

View 2 Replies

XElement And An XPath Expression ?

Feb 1, 2010

I have an XElement and an XPath expression that selects a node from it. It works fine in the original program that I wrote it in but doesnt work if I paste it to another program. I've checked the references and import statements.

I think the problem might be that the original program had the code within the class of a wpf window while it was moved to a abstract class where it doesnt work.[code...]

View 1 Replies

Asp.net - Why Is This XPath Expression Getting Too Much Data

Nov 3, 2011

I have a XPath expression that is supposed to return/get only one node out of the XML document. But it is getting more than the one. I don't understand why.

Code-behind:

Dim xmlNameTbl As XmlNameTable = rootDoc.NameTable
Dim xmlNS As XmlNamespaceManager = New XmlNamespaceManager(xmlNameTbl)
xmlNS.AddNamespace("asp", "http://test.com/asp")

[code]....

View 1 Replies

C# - Xpath Expression To Loop Through Xmldocument?

Feb 19, 2012

trying to parse this:

<?xml version="1.0" encoding="UTF-8"?>
<directoryresponse xmlns="https://www.sisow.nl/Sisow/REST" version="1.0.0">
<directory>[code]......

Here's my code:

XPath = "//directoryresponse/directory/issuer/issuerid"
Dim nodeList As XmlNodeList = XML.SelectNodes(XPath)

but nodelist.count=0...why?

View 3 Replies

Insert Numerical Data Variable Into XPath Expression

Jun 22, 2010

this list has tried to mix numerical variable, such as 1, 2,3 within an xpath expression. [code] For some reason, item_ number_ first and item_number_last appear to have no value in the above code snippet, when they do have values they get printed as in the [code]Could anyone please give me some hints on what to modify here to make the numerical data be able to mix within my xpath?

View 2 Replies

Access One Of The Nodes?

Feb 4, 2010

I have an xml document and I loaded it to work with:

Dim doc As New Xml.XmlDocument
doc.Load("test.xml")

I want to access one of the nodes. It's the third child node of a parent node. How can I get there?

View 1 Replies

Checking Treeview Nodes - If Parent Is Checked Check All Child Nodes

Aug 31, 2011

I'm all new to this treeview business. I have a fixed treeview, very simple and basic. Only two levels, parent and child nodes. I just need two things out of this treeview.

1) If parent is checked, check all child nodes.

2) If just one child node is unchecked, uncheck parent node.

That's it! I've been looking for this for 30 mins and I cant find it. Maybe because my vb.net is old, it doesnt seem to be the same as others =/ I'm using vb.net 2003.

View 2 Replies

Javascript - Check Child Nodes With Text (*x) In Different Parent Nodes ASP Treeview?

Dec 15, 2011

I have a problem with my treeview. I have two child nodes with different parents which contains a literal (*x). In this case (*1) (view image)

[Code]...

View 1 Replies

Loop Through Treeview Nodes To Delete Certain Nodes?

Dec 16, 2010

I have a treeview that is populated from a HDD folder collection. Its structure is similar to the following (however the structure is dynamic):

My Disk:
|
|--folder1(tag:folder)
| |--subfolder1(tag:folder)

[code]....

I call the sub as follows:

deleteNode(treeview1.Nodes(0).Nodes)

However, the above is not working properly. It deletes only some nodes and not all the targeted nodes.

View 2 Replies

Add Treeview Nodes And Sub Sub Nodes Using Functions?

Mar 14, 2009

how to add treeview nodes and sub sub nodes using functions

View 1 Replies

Doesn't Anyone Use Dictionary Member Access Expression

Dec 4, 2009

Doesn't anyone use the dictionary member access expression? (a.k.a. the bang operator) If so, in what scenarios? url...

View 1 Replies

Update An Access Database With A Column Which Is An Expression?

Aug 8, 2009

I have an access database with several tables. in one of the tables there are three columns named quantity, price and total cost.total cost is an expression of (quantity * price). the expression looks grate in the datagrid etc but when I need to save it to the database

View 1 Replies

Access Of Shared Member ... Qualifying Expression May Not Be Evaluated

Jun 22, 2010

re: Access of shared member constant member enum member or nested type through an instance qualifying expression may not be evaluated I understand that this warning means that you should not reference a shared member via an instance. However, in my test case Test2.t.x("3"), I don't understand why it thinks I'm using an instance, since t is also a shared member. Also, note Test3. See what happens when you change declaration of GetObject() As Object to As Test3. I think I understand the behavior (not eval'd until runtime)

[Code]....

View 2 Replies

Ms Access - Data Type Mismatch In Criteria Expression?

Mar 4, 2010

I'm trying to update ms access data using vb.net and here's my code:

updateuserclass.vb
Public Class UpdateUser
Dim bankai As New Updater

[Code]...

What might be wrong in here?I set it all to string, is the primary key usernum not a string.

View 2 Replies

VS 2008 Consume Xml To Access Any Of The Nodes Directly Without Reading Line By Line?

Jul 8, 2010

Is there an easy way to consume xml to access any of the nodes directly without reading line by line?Here is a sample set of the xml working with. It contains two records of data. I am trying to find a way to load it so if I wanted to get say PostalCode and say Site SID value quickly.

HTML
<?xml version="1.0" encoding="utf-8"?><MainSite><MainSites Found="201" Returned="20" Status="0"><Site SID="123456"><Relevance>0.985</Relevance><Title>JDoe</Title><DateModified Date="2010-01-29T01:05:00">1/29/2010</DateModified><DateCreated Date="2010-01-29T01:05:00">1/29/2010</DateCreated><PersonalData><Confidential>0</Confidential><Name><First>John</First><Middle>

[code]....

View 12 Replies

DB Access / ComboBox - Data Type Mismatch In Criteria Expression

Jan 15, 2010

This is the code
Imports System.Data, System.Data.OleDb
Public Class Form1
Public CON As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & Application.StartupPath & "\bible.mdb")
[Code] .....

I got that Error for
data2.Fill(ds1, "Bible")
Data type mismatch in criteria expression
the combobox1 value is numbers

I tried this code
Dim sql1 As String = "select distinct ChapterNum from Bible where BookNum ='" & Trim(ComboBox1.Text) & "'"
And this code
Dim sql1 As String = "select distinct ChapterNum from Bible where BookNum ='" & Val(ComboBox1.Text) & "'"
And it still got the same error.

View 1 Replies

VS 2008 - TreeView Populate The TreeView.nodes With The Default Nodes Via Properties

Mar 14, 2010

I'm running out of walls to bang my head against. Okay new windows form with a textbox, button and TreeView Populate the TreeView.nodes with the default nodes via properties

[Code]...

I want to click button1 and have the name of the childnode? Node3? placed in the textbox. Not via selection, I can do that. But via index or item number. The code I have is as follows

[Code]...

View 7 Replies

Asp.net - Ms Access Insert Error: Data Type Mismatch In Criteria Expression

Dec 20, 2011

I have looked at this for hours and can't seem to figure out what is causing the datatype mismatch. I am trying to insert from asp.net to a access database

insert statement:(ignore the poor practice with the concat parameters)

Dim BSSQL As String = "insert into bodyshop (startdate, enddate, frontbump, rearbump, touchup, other, vehicleid)" & _
"values('" & StartDateBodyShopTXT.Text & "','" & FinishDateBodyShopTXT.Text & "','" &

[code]....

here is a snapshot of the table:the format of the yes/no fields is "true/false"

View 2 Replies

ODBC Microsoft Access Driver - Data Type Mismatch In Criteria Expression

Dec 15, 2011

I have an error "ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression". I am using VBdotNet2005 and MS Access as its database, and I can't really get the hang of this error.

View 8 Replies

Delegate 'System.Threading.ThreadStart' Requires An 'AddressOf' Expression Or Lambda Expression As The Only Argument To Its Constructor?

Jan 23, 2010

I got this Error. below is my code.

GenerateTheList is function.Need help
Private Sub buttGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttGenerate.Click
Dim thread1 As New Thread(New ThreadStart(GenerateTheList))
thread1.Start()
End Sub

View 1 Replies

Code To Put In An Expression To Add Database Columns In A Row And Display It In The Expression Column

Mar 21, 2010

While looking in the dataset designer for a database table I am doing in visual basic 2008 I found a line for expressions under the property menu for a specific column. I need to know the code that I would put in this expression line so that this column adds up the numbers I input into three other columns and displays that number in the column. I need it to automatically calculate this for each row in the database table.

View 13 Replies

XML XPath Not Working

Oct 17, 2011

I have the following 2 lines of code:[code]I'm looking to get the value for first instance of lastWriteTime which should be 2011-10-13T10: 48: 48. 3833771-04:00 but the code just pops up an empty string. Sorry for the big post but here is the entire XML file for reference. Can anyone see why this isn't working, or give me an example of how to make it work some other way? [code]

View 2 Replies

DataColumn.Expression: How To Use A User Defined Function In Expression

Oct 12, 2010

I am trying to write following expression on a datacolumn. But it results in error:Replicate('*', nLevel) + NameWhere: Replicate() is a user defined function (in a module). nLevel and Name are two other columns in same data table.

View 3 Replies

Expression Parsing Using FLEE And Custom Expression Context

Jun 12, 2012

I am using Flee to build a formula builder. It works great but the only problem I'm facing is that Flee doesn't understand Generic Methods I guess. I have a function called IIf declared in the expression context I'm using. [code]How can I work around this. I mean cannot , in sense, write all possible overloads of the function of all .net primitive types. What approach should I take.

View 1 Replies

.net - XPath, XPathNodeIterator To Be Exact?

Feb 7, 2012

Basically I have an XML file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<data>
<sender sndid="FT">

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved