Hi
Thanks but shortening the sorting path did not help and I am not using .net 3/LINQ
Any help?
Thanks!
User Profile
Collapse
-
Hi,
I get the list but NOT in alphabetical order, I wonder why.
ThanksLeave a comment:
-
Sorting a xml file
HI,
I'm trying to sort this list of xml data alphabetically (supplier name) but for some reason this code is not working. Coud you help? Thanks!
My xml
CONTRACTS
-CONTRACT
---SUPPLIER
----SUPPLIERID
----SUPPLIERNAME
My .net.vb page
...Code:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
Hi,
Thanks for your help. I've modified my code to take out the "multiple" sorting because my real problem is that my code doesn't sort at all. If I use "pf:SUPPLIE R" as my sorting criteria nothing happens, for example. I've done sorting before (see http://bytes.com/topic/xml/answers/8...h-unique-value) but when changing the xpath expression then the sorting doesn't work. Thanks again for your help.
...Leave a comment:
-
multiple sorting using AddSort method of the XPathExpression class
Hi
I'm trying to sort a table that contains four columns. I've filled this table with data from an xml file. The idea is to sort the table by clicking on the header of the column. I'm not sure if this is the correct approach. I cannot use xsl and would like to maitain the same code structure but my AddSort method of the XPathExpression class doesnt semm to work. Thanks for your help.
My xml is
...Code:CONTRACTS --CONTRACT
-
Hi, I managed to solve the problem with the sorting. This is my code:
My xml is -----> REVISED
...Code:CONTRACTS --CONTRACT ---SUPPLIER ---COMMODITIES ----COMMODITY -----COMODDITYNAME Dim xdoc As New XPathDocument("testxml.xml") Dim nav As XPathNavigator = xdoc.CreateNavigator() Dim expr As XPathExpressionLeave a comment:
-
This works, thank you very much.
I'm not using xsl. Is there another way?
Thanks again.Leave a comment:
-
Xpath for unique value
Hi
I have the following xml structure
CONTRACTS
--CONTRACT
---SUPPLIERS
----SUPPLIER
-----SUPPLIERID
-----SUPPLIERNAME
I need to get all unique values for suppliers so I dont get the same supplier more than once. I'm using the following xpath but it's not working:
Xpath = CONTRACTS/CONTRACT/SUPPLIERS/SUPPLIER[not(SUPPLIERID= preceding-sibling::SUPPLI ER/SUPPLIERID)]")... -
Hi
Thank you very much. I will use your idea.
Sorry, what do you mean with to be "allowed to expose the source data to your clients".
I am new at .net and xml and any help will be appreciated.Leave a comment:
-
shorten load time for xml file
Hi
I have the below code. It works fine but it takes a long time to load on the browser page. Is there anything I can do to shorten this time?
Also, I would like to search the file for documents with NAME starting with A, B, C, etc. How do I do that?
Thanks for your help!
aspx.vb page
...Code:Dim xdoc As New XPathDocument(xt) Dim nav As XPathNavigator -
-
Hi, thanks for your help.
My problem is how to get the Contract ID, name, etc as they are way back my path. How Can I get:
CONTRACTS/CONTRACT/CONTRACTID
CONTRACTS/CONTRACT/NAME
CONTRACTS/CONTRACT/COMMODITIES/COMMODITY/COMMODITYNAME
CONTRACTS/CONTRACT/SUPPLIERS/SUPPLIER/SUPPLIERNAME
WHERE
CONTRACTS/CONTRACT/CONTRACTTERMS/CONTRACTKEYWORD S
ARE
..whatever...
...Leave a comment:
-
how to find nodes in xml file using xpath
Hi
I have a textbox that people would need to use to search a xml file. If a record is found with that worrd as keyword then the item is returned. I need to return ID, for example, but I dont seem to find the way to do this. Could you help? Thanks. This is what I have but I get "Object reference not set to an instance of an object."
...Code:Dim d() As String Dim j As Integer d = TextBox1.Text.Split(" -
problem in query
Hi,
I'm binding a sqldtatasource to a gridview to obtain some calculations from the data. However something is wrong for the query because I know the calculations are wrong. I hope I can explain clearly:
I have data in database as follows:
I have a table with time slots (Slots):
SlotID Slot
=============== ==
1 9-9.30
2 9.30-10
... -
Executable of aspx file to run in server
Hi
I have a web application that sends an email when pressing a button. I want this page to load automatically so the email is sent without pressing the button.
I've been told I can create an executable of this page and run it in the server. Please, can you tell me:
1) How do I create the executable?
2) How do I run it in the ser ver, say once a week?
Many thanks! -
I cannot change getCategory.
I have to change the element in the xml file before I can apply the xpath, because this xpath queries for "Academic related" jobs, NOT "Acad-related" jobs. And getCategory IS "Acad-related"!!
MY XPATH:
Dim xPath As String = "jobs/category[categoryname = " & getCategory & "]"
Thanks
MLeave a comment:
-
Thanks for your help but I dont think your answer is solving my problem.Here there is a more detailed explanation:
Xml file:
...Code:<Jobs> <category> <categoryname>Academic</categoryname> <categoryid>1</categoryid> </category> <category> <categoryname>Academic related</categoryname> <categoryid>2</categoryid>
Leave a comment:
-
Hi
Thanks for your prompt reply.
But I don't want to edit but to replace one of the elements innetText in the file while the file is loaded and before I apply the xpath expression (query).
My xml file looks more or less like this:
<Jobs>
<category>Acade mic</category>
<category>Acade mic related</category>
<category>Resea rch</category>
...Leave a comment:
-
Replace element in Xml file
Hi Help..........! !
I have a xml file and need to load it, read it and replace (only in memory) the content of one of its elements.
How do I do that?????????
Many thanks
M
ps. I'm using vb.net -
vb.net/c# : Check duplicate record before inserting in database
Hi,
I want to check in the below code if the email exists in the database before inserting. How can I do that?
...Code:Dim EmailAlertDataSource As New SqlDataSource() EmailAlertDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("DB_EmailAlertConnectionString1").ToString() EmailAlertDataSource.InsertCommandType = SqlDataSourceCommandType.Text EmailAlertDataSource.InsertCommand
No activity results to display
Show More
Leave a comment: