User Profile

Collapse

Profile Sidebar

Collapse
milecimm
milecimm
Last Activity: Nov 29 '10, 03:17 PM
Joined: Oct 4 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • milecimm
    replied to Sorting a xml file
    in XML
    Hi

    Thanks but shortening the sorting path did not help and I am not using .net 3/LINQ

    Any help?

    Thanks!
    See more | Go to post

    Leave a comment:


  • milecimm
    replied to Sorting a xml file
    in XML
    Hi,
    I get the list but NOT in alphabetical order, I wonder why.

    Thanks
    See more | Go to post

    Leave a comment:


  • milecimm
    started a topic Sorting a xml file
    in XML

    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
    ...
    See more | Go to post

  • 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.

    ...
    See more | Go to post

    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
    ...
    See more | Go to post
    Last edited by jkmyoung; Mar 24 '10, 06:20 PM. Reason: [code]tags[/code]

  • milecimm
    replied to Xpath for unique value
    in XML
    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 XPathExpression
    ...
    See more | Go to post
    Last edited by jkmyoung; Mar 24 '10, 06:19 PM. Reason: Code tags

    Leave a comment:


  • milecimm
    replied to Xpath for unique value
    in XML
    This works, thank you very much.

    I'm not using xsl. Is there another way?

    Thanks again.
    See more | Go to post

    Leave a comment:


  • milecimm
    started a topic Xpath for unique value
    in XML

    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)]")...
    See more | Go to post

  • milecimm
    replied to shorten load time for xml file
    in XML
    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.
    See more | Go to post

    Leave a comment:


  • milecimm
    started a topic shorten load time for xml file
    in XML

    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
    ...
    See more | Go to post
    Last edited by Dormilich; Mar 3 '10, 06:50 PM. Reason: Please use [code] tags when posting code

  • milecimm
    replied to how to find nodes in xml file using xpath
    in XML
    Hi
    Thanks for your help. It worked.
    See more | Go to post

    Leave a comment:


  • milecimm
    replied to how to find nodes in xml file using xpath
    in XML
    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...

    ...
    See more | Go to post

    Leave a comment:


  • milecimm
    started a topic how to find nodes in xml file using xpath
    in XML

    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("
    ...
    See more | Go to post
    Last edited by Dormilich; Mar 1 '10, 01:19 PM. Reason: Please use [code] tags when posting code

  • milecimm
    started a topic problem in query

    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
    ...
    See more | Go to post

  • milecimm
    started a topic Executable of aspx file to run in server
    in .NET

    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!
    See more | Go to post

  • milecimm
    replied to Replace element in Xml file
    in XML
    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

    M
    See more | Go to post

    Leave a comment:


  • milecimm
    replied to Replace element in Xml file
    in XML
    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>
    ...
    See more | Go to post

    Leave a comment:


  • milecimm
    replied to Replace element in Xml file
    in XML
    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>
    ...
    See more | Go to post

    Leave a comment:


  • milecimm
    started a topic Replace element in Xml file
    in XML

    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
    See more | Go to post

  • 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
    ...
    See more | Go to post
No activity results to display
Show More
Working...