What would be the fastest way to put XML nodes in memory? I can use generics, arrays, list arrays and so on but how to get the nodes first? All of the following are taking too long:
XmlDocument.Load XmlDataDocument (used it by accident) XPath.XPathDocument("path")
I can loop through 500 000 Nodes and get the 30 000 uniques in less than a second instead of 3 hours previously but loading the nodes takes whole 20 seconds. Never thought this would be the bottleneck.
I want to save an HTML document into my.resources, and then load it in webbrowser1.navigate when it is called to do so, but it seems when I save my.resources.myfile and call it with webbrowser1.navigate(my.resources.myfile) it wont navigate properly or read the html file properly. How can I have an html document be saved in my resources and load in a webbrowser???
My question sounds simple to me, and hopefully to those of you more knowledgeable than I, but its deceptively complex for me. I want to create an XML document with the declaration of:
I have two classes; one is a data class which contains routines to handle data and the second is a utility class which contains useful routines which can be used again and again. I have come across a problem. Some of my routines in the utility class use routines in my data class and now I want to use some of my utility routines in my data class. I tried this in a service and the service just would not start. After commenting out code I realised it was because I was making a declaration in the utility class for the data class and in the data class making a declaration of the utility class.
I understand that this is now causing looping but is there a different way to do what I want. If not I would need to have two copies of routines in both classes.
I am having some serious difficulty using KSoap2 to connect to a VB.Net webservice and am hoping I could get some help from someone who is smarter than me. I have been trying to work this out for 2 weeks with no luck.So this is my problem. Using KSoap2 on the Android platform I have successfully queried a super simple web service that I created using vb.net (It can be found at [URL] I receive a XML result which looks quite reasonable to me.
ReturnCustomerObject2Response{ ReturnCustomerObject2Result=anyType{CustomerID=1; FirstName=This is a test; }; }
However at the point where I try to cast the object I am returning from the webservice into a KvmSerializable object (as required by KSoap2) I receive a java.lang.ClassCastException.This is my object (I have excluded imports for brevity):
public abstract class BaseObject implements KvmSerializable { public BaseObject() { super();
I have wrote a routine to upload a database file to a server using webservice which works fine until I try and send a large file. It errors all the time saying the connection was disconnected. how to upload large files?
I got this text document that is opend by my server and is edited by my server the whole time. Now i want to load this document into my program only it says its in use what is normal... but is there a way to use it ?
your life whatever you are doing.I have a big question. Well, it's a big job for me. I tried to google and follow some tutorials frist but finally realise rom stackoverflowers.I have a one big xml file such below. I have no control over its structure as it already exists with data.
HOWEVER, whenever the debugger hits this line, it simply quits. No the application doesnt quit, no it does not hit the finally, end try or End Sub...it simply quits the sub. Actually, I think it causes the app to freeze but hard to tell because it happens in a dialogue form and this causes the dialogue form to bypass its close statement!
Imports System.Data Imports System.Data.OleDb Public Class Form1 Dim con As OleDbConnection Dim cmd As OleDbCommand
[CODE]...............
The insertion part of the form works great. But my problem is in the form load part......If i leave a field blank(Null),then perform Save operation,close the form after successful insertion and then reopen the form,then it retains the previous values during the form load......This is only in case where i leave a field blank in the previous data entry in the database.......But if i enter values in all fields then form load is working great.
I have a class that's getting an XML document from a URL. I've verified that the XML from the URL has an newline at the end. For some reason, though, this newline is stripped off before being fed back to the user, which is causing an mal-formed XML error when the users feed this XML file into other programs.
Dim reader As XmlTextReader = Nothing
Dim filename As String = _partID & "_" & _majorRev & "_PreCheck.xml" Dim localFile As String = fileDialog.FileName Dim URLString As String = _env.HTTPInfo("stwebservices").UriBase & "PreCheckXMLReport.aspx?partId=" & _partID & "&rev=" & _majorRev reader = New XmlTextReader(URLString)
I am trying to figure out a way to implement password protection on documents that a program I am working on creates. They should remain with the document regardless of where it is copied to or sent.Here is a rough sequence of events:
1. Application Opens (no document loaded).
2. User opens document with extension registered to application.(could also be # 1 if they clicked on the document directly)
3. Application Security checks document for security and prompts if necessary.
4. If prompted, user enters password.
5. Application checks password.
6. If passed, document opens, otherwise user is notified of failure.
show me the way to insert autoshape in a word document. I am using VS 2005. I stumble upon this for an hour.I'm not good at COM objects, not quite familiar on how-to's on them. Please give me a little light on this.
My program splits a mulitpage tiff file (batch of purchase orders from Sage MMS)into separate files by doing OCR and using the MODI functions.My code has three main loops. 1st loop goes through each of the pages and splits the tiff into separate tiff files based on order number and stores them in a directory. for each order i also create an array of information by doing OCR from the tiff ie. order number, customer etc etc. 2nd loop goes through the array. for each order number in the array checks to see if there is another tiff file existing in another directory. This could be a separate sheet which needs to be attached to the main purchase order and comes from a document scanner in another office.If there is an additional file i merge that tiff file with the current tiff file. 3rd loop goes through the array once more and uses the microsoft faxcomexlib to faxed the files using my server 2003 fax serverthe 3 loops work perfect and very fast and i can send the faxes no problem.
I also add all the array information into an access database so historical purposes.My problem:In the first loop i need to check that the fax has not already been sent. (users can reprint orders so need to be careful that fax isnt sent more than once) I do this by getting the order number and querying the database. If the order does not exist then i can proceed else i prompt the user to refax yes or no.i have put the database connection and sql in a function which returns true or false. however when i add the function to my main loops i get a file lock on the current order. If i remove the function my code works perfect.
Dim conn As New OdbcConnection(constr) Dim cmdselect As New OdbcCommand ' Get status from current job
I have a situation where I have an xml document that has a bunch of elements that I basically use as data variables. I populate the variables from various sources and then transform the xml file to an html file for user viewing.having to remember the names of all the data elements in the file is somewhat tedious. Is there a way to generate a strongly typed xml document object so that one can simply dot into the various data elements?
I am having tremendous difficulty getting word automation to insert a page break in my document. The app is generating letters in word and saving them....the code below shows where I am writing the first page (str.tostring) then all of the code after that are the various ways that I have tried to insert a page break so that it will go to the second page and I can unload information into the second page of the document. [code]
class memtest { public static void main(String[] args) {
[code]....
When i run this program my CPU load rises to 45-60%. I need to catch this CPU load in my another java program.But i know it cant be done using pure java. how to find the load of JVM using .net or VB and then how to get that data in java using JNI? Atleast if JVM's load cant be found, i need total CPU usage.