Xml - Duplicate Selection In Text() XPath Selector
Jan 7, 2010
I'm trying to select all nodes with text that contain a certain word (ex: Company) because the word needs to have a register mark.
Here is part of the XHTML (this <p> is inside a table cell).
<p>
<strong>
<a style="color:#0E5A8B; text-decoration:none" target="_blank" href="http://www.trekk.com">
[Code]....
My goal is to just select the 2nd one, the <span> tag and am not sure why <p> tag is also being selected. If it selects <p>, but why wouldn't it also select the <strong> or <a>, and why not the <table> or <td> that contain the <p>?
View 1 Replies
ADVERTISEMENT
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
Feb 17, 2011
We want to get XPath of highlighted text from a web page. How to do, pls guide us.
Currently we are using GeckoFX layout engine to display web page. Its a windows application using VB.Net
We have to get selected text/object full html tag ..
ex: If I an selecting a list item which is under a body and div tag the I have to get like this \bodydivulli
View 1 Replies
Feb 15, 2011
I have been at it for few weeks now and just learning XML and VB but seems like I hit a road block. I tried a few different attempts at doing this and I have no problem displaying the XML file on a webpage using the xpathnavigator class. But then i needed to format into an html table so i took another route and just added the xmldatasource with a formview. So here is my code for that
<oriondata station='GiftShop'>
<meas name="GiftShopTime">2011/02/08 16:39:01</meas>
<meas name="GiftShopItemNumber">6</meas>
[code].....
View 3 Replies
Jan 2, 2010
I am trying to find out how to get a particular control.In some applications i've seen they have this little control like a small text box.It has 2 little buttons on the size one for up and one for down.
These buttons change the displayed numbers higher and lower.Here, let me show you a picture:
How can i get this thing? I don't see it in the toolbox of the VB 08'
View 3 Replies
Feb 24, 2009
I want to make a form to schedule the on and off time of equipment. & rows for seven days. 96 columns for 24 hours divided by 15 minutes. Each cell will be red for on and green for off. Click the cell to toggle the color. I know what I want it to look like. But I dont think using 500 buttons is a good idea. I am looking for better ideas on which direction to go. I am using visual studio express.
View 1 Replies
Apr 19, 2011
The program has 3 list boxes and the user is supposed to choose an option from the 1st and 2nd list box and add the total in the third list box, when i run the program all i get is $0.00. I was told a loop was needed, but I'm not sure where I need to put it and what kind of loop I nee
Dim Day As Integer
Dim Total, Fee, Stay As Double
Dim Workshop As String = lstWorkshop.SelectedIndex()
[code]......
View 3 Replies
Jan 16, 2011
So now I will try to make something more complex, still playing around with this graphics thing.I want a picturebox to display a tileset (a bunch of 32x32 tiles normally used for creating game levels etc), the picturebox is inside a container (which has autoscroll ON). The picturebox is larger than the container, so the container will make scrollbars automatically.Now, I need to be able to choose a tile or multiple tiles (if I click & drag the mouse)Basically I want to draw a 32x32 "red" box over each selected tile (so the user knows what tiles are selected).So first of all, I need to know when the mouse clicks the picture. Good. It works.Now, I need to know which 32x32 tile was clicked. Well, I think I can calculate that just fine.BUT, what if the user drags the mouse while clicking on a tile? I want to support multiple tiles selected, but I am clueless about tracking what tiles were chosen.If we solve that problem, I would have another curiosity: You know the "red boxes" that tell you which tiles are selected? What would happen if I dragged the scroll bar? I need the redboxes to move along with the picture, and hide if they go to an invisible area.
View 6 Replies
Apr 19, 2010
i'm creating a program called Workshop Selector. It has 3 list boxes, one with the 5 workshops, second with 6 locations, and the final is the list of costs. The user selects a workshop, a location, then hits the Add Workshop button, which calculates the costs and adds the cost to the third listbox. Soo, to my question.
There is an additional button called Calculate Total that adds the values of the costs in the cost listbox and displays the total in a textbox. The code i currently have that works just fine is --
Dim one, two, three, four, five, total As Integer
lbCost.SelectedIndex = 0
one = CInt(lbCost.SelectedItem.ToString)
lbCost.SelectedIndex = 1
two = CInt(lbCost.SelectedItem.ToString)
etc..etc..
total = one + two + three + four + five
tbxTotal.text = total
While this works, i have no idea of knowing how many times the user will add a cost to the cost listbox. therefore id have to make many many variables, and other issues occur.So is there a way i can do this with a for loop? declare a global variable like
Dim costcounter as integer
then at the end of the add workshop cost btn click procedure use:
costcounter = costcounter + 1
That way i kno the exact amount of times the person added a cost?
Then create a for loop like
Dim intcount As Integer
For intcount = 1 To costcounter
code....
Next
Would this work somehow? but what code would i have to input within the for loop to scan each selected index, and then return values that can be added together and displayed in a textbox?
View 2 Replies
Feb 17, 2011
I have a form that contains an array of textboxes that are created at runtime. 72 to be exact. They will be used to hold the serial numbers of parts that will be be read with a scanner. I need to check that there are no duplicates in the serial numbers while the operator is scanning in the parts and then change the backcolor of the matching textboxes if the text is the same in 2 or more.
I tried this and it doesn't work
Code:
Dim j, k As Integer
Try
For j = 0 To 71
[Code]....
View 6 Replies
Jun 2, 2010
I need to create a few visual controls to reside on my form.
1- Rotary Selector to rotate and select an option. (maybe up to 16 steps per rotation or 0 to 15.)
2- Rotary dial to act like a volume control. This actually selects a value between 0 to 255 or 0 to 1023. (is this too many steps?)
3- Bunch of selector push buttons to act like the old car radio selector? (pushing one resets the other buttons. Just like old car radios?)
View 1 Replies
Jun 30, 2010
I have a text file DIC.TXT.[code]...
View 4 Replies
Jan 7, 2011
Having trouble removing Duplicate lines in a text file. (Exact Duplicate lines).
If I have a text file called animals.txt, how can I use the StreamWriter to loop through a text file, and erase and duplicate lines?
For example: If the text files says this...
cat
cat
cat
dog
[Code].....
View 4 Replies
Nov 20, 2009
Compare textboxes and remove duplicate lines/text..
View 3 Replies
Jun 30, 2010
I'm going nuts with this. Obviously I cannot open the reader ard writer on the same file simultaneously.
[Code]...
View 1 Replies
Sep 27, 2009
I am adding line entries in a .ini file. The problem is, I am creating duplicate lines in the file, which I do not want to do. I searched this issue online, and the consensus is to use an array, loop through for duplicates and create a new file. However, being so new at this and teaching myself how to code no less, I am at a dead end. This is not a school project, it is something I am doing for work on my own time. I have all of my code done for the program except for this last step.
[Code]...
View 7 Replies
Nov 24, 2011
this is the code working 100% for (merge , remove duplicate lines and Store ) two text file using vb.net Imports System.IO Public Class Form1
[Code]....
View 4 Replies
Mar 16, 2011
i have 4 text box how can i display a messagebox that will prompt the user if theres any duplicate text on the four Textbox. Main idea: i just want everything that the user typed in each 4 textbox to be unique."i tried coding at the textbox that if the text box is change, that if theres another textbox with the same data i typed a messagebox will prompt. almost does it but, since i added a diaglogresult code that if i click yes the text box with the code will be change to a null object.. but since the other text box are null objects the messagebox will prompt me again..
View 7 Replies
Sep 1, 2009
I was just wondering if someone could show a code sample that will remove any duplicate text from Textbox1.text (with multiplelines).
I need to remove the sentence "Send a private message to" and prevent it from entering Textbox1.text.
View 16 Replies
Oct 13, 2011
Let's say I have selected a few (or one) words. I want to add text before the selected word(s) and after the selected word(s). How would I do that?
View 2 Replies
Oct 29, 2010
based on a selection of name and time i want to add a value or text in datagridview,but it doesn't return a value... this my code
Public
Sub Btnplanner_Click(ByVal
sender As System.Object,[code]......
View 2 Replies
Mar 23, 2012
I have a telerik radgrid, like shown underneath [code]When I click one of the rows, it will display the password of the clicked row, like so:[code]That works fine. I am proceeding this way because the decryption of the password is a rather complicated and long process, so decrypting one password at a time is less time consuming, especially when the user doesn't need all the passwords.When I have the password displayed, I'd like to be able to select the password in the grid to copy it. Unfortunately, the radgrid will fire the "RowClick" item command once more, and the row gets de-selected. Therefore, I cannot copy the passwords. My question is: Is there a way to cancel the itemcommand of a radgrid under certain circumstances? I'd like to be able to disable the itemcommand event when the password is already decrypted.[code]
View 1 Replies
Feb 2, 2011
I am a newbie starting to learn on how programming in vb language, and now I would like to know---> How to get selection text from any text editor such as in Notepad, Wordpad, MS Word, Excel, ...and so on ...to show in VB2010 Textbox.
View 2 Replies
Mar 27, 2012
I have a telerik radgrid, like shown underneath
| Username | Password |
-------------------------
| A_user | ***** |
[code].....
View 5 Replies
Mar 17, 2011
I have this data in txt file and the data keeps changing all the time.
[code]...
I would like to read all lines and compare, if the same name and same address is found, which is in the [......], then i need to count it and show the most frequent buyer!should i read it all and put in array, and compare and put the duplicate data and count into another array?
View 6 Replies
Mar 26, 2009
How do you code selection of text within a RichTextBox. I tried the following code and nothing happens.I would think this should select all text within the RichTextBox.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.RichTextBox1.SelectAll()
End Sub
I would think this would select text from a start point to an end point.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ss = Convert.ToInt16(TextBox1.Text)
se = Convert.ToInt16(TextBox1.Text)
Me.RichTextBox1.Select(ss, se)
End Sub
View 1 Replies
Dec 6, 2009
I do not want the text in my WebBrowser control to be selectable. How would I do this?
View 4 Replies
May 9, 2011
I am looking to include in my word processor a drop down font selection button, much like that in MSword, where it shows the installed fonts an allows the user to pick one. It is for a rtb, so I'm not sure if it's possible. If it isn't, could you guide me into coding a button with say the text 'Arial' to change the selected text in my rtb to arial. Also, which fonts are supported by rtbes?
View 11 Replies
Aug 10, 2010
i want to do the following : select text in a web browser control, then click a button. When the button is clicked , the selected text should be copied to a richtextbox.
the main problem is how to copy the selected text from web browser control?
View 1 Replies
Feb 27, 2009
I am trying have a data grid selection populate a form. I am new to this.Basically I have a connection persistance object and I would like to call that and call a stored procedure with the value of the selection. The datagrid is bound to an object.
[Code]...
View 1 Replies