Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: EwS
  • Content: Threads
  • Order by date
  1. EwS

    XSLT - replace element's value with another element's value

    I'm using a transform stylesheet to convert xml doc A into xml doc B. This is what's part of doc A: <From> <PartnerInformation> <PartnerName>Company A</PartnerName> <PartnerIdentifier Agency="ID">1</PartnerIdentifier> </PartnerInformation> </From> <To> <PartnerInformation>...
  2. EwS

    XSLT transform problem

    I know very little about xslt. Here's my .xslt that transforms xml doc A into xml doc B: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output version="1.0" encoding="UTF-8" indent="yes" method="xml"...
  3. EwS

    Text concatination using a parameter

    I would like to replace the 'OrderCreate' with a parameter called myParam (sometimes the parameter will be "OrderCreate", sometimes "OrderChange"). Here's the code where the value is hardcoded - it works: <xsl:if test="(position() = last()) and...
  4. EwS

    Test connection with WebClient

    The code below is what I use for posting an xml file to the remote server. It works fine. However, there are times when I just want to test if the server is down without actually sending any file. How can I do that? public void PostResponse(String fileName, String uploadUrl) { ASCIIEncoding...
  5. EwS

    Edit App.config with no need to rebuild the app

    I have a Windows Service that reads the settings from the App.config file. If I need to make a change to one of the settings, I have to rebuild the app and reinstall the service. Is it possible to have this App.config file sitting in some directory and let the service know where it is so the...
  6. EwS

    How to stop a Windows Service gracefully?

    I have a Windows Service which processes some files every X seconds. The service should run 24/7 unless there is an exception, in which case I stop the service. However, there are times when I would want to stop the service manually (through Admin Tools/Services). How do I ensure that when I do...
  7. EwS

    Disable the timer while function is executing

    I have a Windows Service with the timer - every 15 seconds I'm calling a function. I need to add some logic to tell the timer to "wait" until the function is done executing its code (which can exceed 15 seconds) because I don't wait the timer to "hit" the function while it's still executing...
  8. EwS

    String comparison not working

    I'm trying to compare two strings a and b. When I inspect the variables in Eclipse I see the following: a value=char[6] [0]=t [1]=e [2]=s [3]=t [4]= [5]= b value=char[4] [0]=t [1]=e [2]=s [3]=t When I do a comparison if (a == b), the if condition is never met. If I hard-code a="test", then...
  9. EwS

    Convert from GMT to local zone using Daylight savings

    I'm looking for code that converts date/time in GMT format to the local time zone format. I found some examples on the web, but they don't account for daylight savings. Is there any java function that would do that for me?
  10. EwS

    XSD doesn't validate XPath

    I'm fairly new to xsd. I'm validating xml against xsd using XmlReaderSettings. It looks like my xsd does not verify the element path: My schema definition allows for both OrderProperties and OrderPartners elements, however Partner can be specified only under OrderPartners. In other words, the...
  11. EwS

    Is this possible when validating xml against xsd?

    Right now, in order to validate my xml file against xsd, I include the following line in the xml file: xmlns="urn:mySchemaName" Is it possible to link xml to xsd without specifying the schema in the xml file? Thank you for your help!
  12. EwS

    Changing node names and inserting nodes with XSLT

    I'm using XSLT to tranform an order create xml into an order response xml. My stylesheet needs to do two things: 1. Replace all occurrences of "OrderCreate" with "OrderResponse". The code below replaces a single tag called <OrderCreate>. How do I make it replace tags like <OrderCreateBody> into...
  13. EwS

    How to make Excel file read only?

    I am creating an Excel file programmatically. I would like to make it read only. How can I do this? Thank you.
  14. EwS

    How to ungroup sheets programmatically?

    I'm adding several worksheets to my Excel spreadsheet. After the last one is added, I activate the first worksheet: workbook.Worksheets.Select(1) The problem with that is that when I open the .xls and make a change to that first worksheet (such as hide some rows), the change is being reflected...
  15. EwS

    Question about SELECT stm performance

    Let's say I have 10 customers that I need to select from my SQL database. I'm using a join in my select statement and the tables are pretty big. I have some processing to be done for each customer after it's been selected. I'd like to know what would be better in terms of performance (speed)...
  16. EwS

    How to query App.config?

    Here's my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="customers"> <section name="test1" type="System.Configuration.DictionarySectionHandler" /> <section name="test2"...
  17. EwS

    How to retrieve a value from App.config

    Here's my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="customers"> <section name="test1" type="System.Configuration.DictionarySectionHandler" /> <section name="test2"...
  18. EwS

    xlSheet.get_range not there

    I'm trying to use the get_range method on an Excel sheet, but when I type 'xlSheet.' I don't see the method in the drop-down. I see Cells, Name, etc. I don't know why. This is my code: Dim workbook As Excel.Workbook = workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet) Dim xlSheet As...
  19. EwS

    Alter order of menu items under Programs menu

    When I install my VB .NET application, it creates a folder under the Programs menu. I have two items in that folder. They seem to appear there in the "default" order imposed by VS. How can I change the order of those items? I cannot drag and drop. Thanks for any help!
  20. EwS

    Get rid of leading spaces in date

    '6/5/2007' displays as ' 6/ 5/2007' in my dateTimepicker. How do I get rid of the leading spaces? What custom format can I use? Thank you.

Part and Inventory Search

Back
Top