XML load problem


im using VBScript to open generated .XML files off the local file
system and do stuff with them. the problem i'm running into is:
sometimes the .XML is invalid and contains an ampersand that is not
qualified. ex:

    <FOO>$.01 & Greater</FOO>

....which causes problems when i attempt to load via:

    Dim xml : Set xml = CreateObject("Microsoft.XMLDOM")
    xml.async = "false"

    If xml.load(sXmlPath) Then
       '[do stuff]
       '[report error]
    End If

what can i do? is there a way get back an exact line # for the failure
to load, and then perform some string manipulation on it?

9/23/2010 7:00:44 PM
scripting.vbscript 564 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 43

On Sep 23, 2:00=A0pm, SpaceMarine <spacemar...@mailinator.com> wrote:

> what can i do? is there a way get back an exact line # for the failure
> to load, and then perform some string manipulation on it?

examining the XML object i did find some properties to help w/ run-
time adjustments to the XML:


....i can probably use these to open the text file to the proper line
and replace "& " with "&amp; "

9/23/2010 7:26:53 PM

Similar Artilces:

Problem with komma versus period in Excel
Hej I am have problems with the use of period in Excel. I Denmark komma is the decimal seperator. If I convert (from within VB Editor) the content of a cell from "6340,00" to text and replace the komma with period I get "6340" (I wanted "6340.00). If I make the convertion in Excel and record the macro at the same time I get the desired result i my sheet. BUT when I put in my code in VBA and run it from here I still get the wrong result, "6340" and not "6340.00". I know Excel (VBA) transform "." to "," probably acording to...

Report Writer Text Spacing Problems While Modifying a PO form
Due to Report Writer static text field size limitations, I am forced to try to use two adjacent text fields to complete a sentence. I am having an inordinate amout of problems trying to get words to align in sentences with the correct amount of character spacing between words that span the text field boundaries. And, the process of toggling between Report Writer and Dyamics to get the Purchase Order form to reprint is time consuming. What am I missing (besides patience)? -- Jay Jay, 1) Setup a calculated field for your static text. Set the result type to String, and use the Constant...

Help! Setfocus problem
i ave a dropdown field on the first tab. I use setfocus so that it selects a different field to stop users scrolling down and changing the selection on the load event. Problem When a user changes tab and come back to the origional tab the setfocus doesnt run as the form is already loaded. How do you get around this? This is driving me and users mad at minute...please help before i open another bottle of dark rum! Hi Brian, Check out following URL; how to fire onclick event on tab click. It may help you. http://crmrocks.net/?p=16 -- PLEASE do click on Yes or No button if this post wa...

Exchange Patch (KB912442) causes problem w/ share login accts
Exchange2003 std SP2 w/ Office 2003 & XP clients. We have several users who shares a computer, so instead of logging in w/ different users accts, I set them up w/ a shared logging and access Outlook w/ multiple Mail profiles. However, after installing KB912442, it blocks these users from sending emails. It gives them an message that the shared login doesn't have the right to send emails on behalf of this user. I checked the mailbox rights in AD Users and Computers, the shared login has Read & Full mailbox rights permissions. Any idea how to fix this. Thanks in advance. ...

Safe Pay Check Amount Problem
I am trying to setup Safe Pay. Everything seems to be working fine except for one annoying quirk. Our bank's Positive Pay data format gives us 12 characters for check amounts ($$$$$$$$$$¢¢). The file that Safe Pay generates is working perfectly except for those checks that are greater than $9,999,999.99 (9 characters). If the check amount is greater than that (say $10,000,000.00), the value that the Safe Pay file shows for that check is 002147483647. And, even if none of the individual checks exceed $9,999,999.99, if the total of the checks in the batch exceeds that a...

Internet connection problem
Hi. I hope someone is able to cast some light on a problem. We have a home network (all computers running XP) some wired and some wireless. For about a month now we have intermittent connection problems in that any one computer (randomly) will not connect to internet. I think all of the computers have suffered from the problem. Rebooting the affected computer makes no difference but rebooting the router can sort it until the next time. Even my mobile phone occasionally cannot connect. In Firefox the message is just "server not found". Pinging an IP address results in a time...

Problem with charting Net income vs Year
Im having some problems with my Excel chart. It will not plot Net Income vs Year. It keeps trying to treat Year as a different data series. It will work if I use text i.e. a1990, a1991, etc. but it refuses to use 1990, 1991... Any Ideas??? Use an "XY (Scatter)" chart, instead of a "Line" chart. Jerry Hunter wrote: > Im having some problems with my Excel chart. It will not plot Net Income vs Year. It keeps trying to treat Year as a different data series. It will work if I use text i.e. a1990, a1991, etc. but it refuses to use 1990, 1991... Any Ideas??? Delete the co...

Problems opening/saving attachments
I am unable to open or save any .rtf file attachments - this started happening today, previously there were no problems with .rtf files. When I try to open such an attachment I get this message: Can't create file: xyz.rtf Right click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder. What folder is this? I am trying to open the attachment not creat the file! Also, when I try to send an rtf file as an attachment, in the email message the file does not show in the attachments section but the receipient actu...

Excel hyperlink problem
Hello everyone, I have a strange excel problem and it's driving me nuts - I would be seriously grateful if someone could help me out! A colleague has this excel document with a huge number of hyperlinks in it, well over 1000 (don't ask me why she wants to use excel - she just does). The hyperlinks are in this format and are using DFS: \\cc\root\pte\tru\ch\scandata\Archaeology\1980\xxx.pdf Whenever she clicks on a link, a pdf from another area of the network is opened. Quite simple and no problems so far. However, as of yesterday, whenver she makes any kind of change to the excel fi...

securety problem
Hi, I start an app in vb with this code: ActiveWorkbook.FollowHyperlink "C:\te.exe" I always get a warning about hyperlinks that can be harmfull to computer. How can I bypas this warning. I �ve put my macro securety on low and trust all installed add-ins and templates + trust acces to visiual basic project. Is there a way so the warning won�t show Thanks Johan -- climax ------------------------------------------------------------------------ climax's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30816 View this thread: http://www.excelforum.com/...

wire transfer download problems
I made an international wire transfer of $5000 from my US bank. The receiving bank in Panama took $15 as a service fee and credited my account with $4885. Somehow my US bank now wants to show the amount as $4885 during downloads to my checking account. But some genie reminds Money 2004 that the original amount was $5000 which triggers a discrepancy. As a result, this transaction wants to download each and every time, whether I change, accept, or whatever. Thanks for help. In microsoft.public.money, lanecito wrote: >I made an international wire transfer of $5000 from my US bank. Th...

Interesting TIF file problem
At the company I work for, we have someone that exports AutoCAD drawings to a TIF file, then inserts the TIF file into an Excel spreadsheet. We have quite a few of these. Other users can open this spreadsheet, view it, do a print preview, but when they try to print the file the inserted picture does not show up. All that prints is a box with the broken url red x document image. It seems that the problem is with Office XP. The Excel files are created with Office 2000, and they print fine from Excel 2000. On Office XP and Office 2003, the file won't print properly (all systems are ru...

Annoying problem with lookup field
On a client, I have a MOSS 2007 portal with two lists which are not wroking as expected. One contains people and the other one contains a lookup field based on data from the first list. When someone which hasn't got administrative rights logs in and tries to see the properties of any element in the second list (on DispForm.aspx), they can't see the lookup field value, and if they try to edit the element, the dropdown control used to choose a person from the first list appears empty. Administrator don't have this problem. The users having the problem have collaboration rig...

Problem with vba code to export query result in excel
Hi, I have a access report that exports to excel with click of a button after choosing parameters. This works well. However I have to modify couple of fields to utilize formula in the export module. I am not sure how to do this. I am writing the above code which seems to cause problem. I appreciate any help to resolve this issue. Thanks. Code: If lngColumn = 12 Then xlc.Offset(0, lngColumn).Value = =([UnitPrice]*[OriginalShippedQty])/1000 End If It seems the fields UnitPrice and OrigianalShippedQty are not being recognized here Jack wrote: >Hi, >I have a acces...

an attempt was made to load a program with an incorrect format
Hello, This is the error I get on Windows 7. I tried going to the project screen in vb.net Studio 2008, and changing the target cpu to x64. This did not work. Do I have to build the program on Windows 7? I'm sure this must be a common problem for programs going to Windows 7. Thanks for any help. Scott On May 22, 2:17=A0am, "Scott Baxter" <sc...@websearchstore.com> wrote: > Hello, > > This is the error I get on Windows 7. > > I tried going to the project screen in vb.net Studio 2008, and changing t= he > target cpu to x64....

Uploading problems
Hi all, I hope someone can help me with a few difficulties i'm having uploading my website. 1. When I upload, only the first page is uploading - so pages 2-7 don't appear 2. Images do not download with the webpages so when you type in the url, you simply see a blank space where a photo should be with a small icon at the top left courner which sometimes offers the option of 'show picture'. 3. The webpage is positioned to the left of the window when it appears and doesn't centre itself to the page so there is a huge chunk of white space to the right of the window. Can ...

Winmail takes 4 minutes to load at boot time
Running Windows Vista Home Premium on Lenovo Laptop 2 gig mem. After logging in after rebooting, it takes 4 minutes to load Win mail. I used the "event Viewer" to see what was happening. It showed ESENT with ID 102--start Win mail, then the next event is ESENT ID 103 4 minutes later--terminate Win mail. Anyone have a clue why it is taking Win mail so long to load? Win mail works fine after computer loads. Fred Dwight Fred wrote: > Running Windows Vista Home Premium on Lenovo Laptop 2 gig mem. After > logging in after rebooting, it takes 4 minutes ...

re install Pub 2000 problem.
Hello and I hope I'm In the right newsgroup. My problem is I've had to re install my Office 2000 Disc2 and now when I want to start publisher the message box tells me I am trying to access a program that needs the cd. When I installed it, I checked for Publiher to "run all from my computer" I've un installed and re installed, still need disc. what am I doing wrong? Thanks for your help, John :) Johnny1r wrote: > Hello and I hope I'm In the right newsgroup. My problem is I've had to > re install my Office 2000 Disc2 and now when I want to start publis...

"Archive all messages sent or received by mailboxes on this store" option problem
I want to backup the all message sent or received by mailboxes, I find that there is an option "Archive all messages sent or received by mailboxes on this store " in Exchanger 2003. I had selected this option and forward to public folder. But I found that not all message will be archived. - All message sent by mailboxes can be archived - Some Messages come from mailboxes will not be archived Eg: yahoo, hotmail, and other company Is this option not archive this message ? Any other setting need to configure ? Dennis ...

CHtmlView shutdown problem
Hi! We created an MFC regular DLL whch is loaded by an old MFC-app (built with VC++ 6.0) but we dont have access to the source of this app, just an DLL-interface. our regular DLL loads several MFC extension DLLs. one of the extension DLLs uses a CHtmlView based object which is used within a docking pane, we dont use document/view-architecture. when I shutdown the app, it takes more than 1 minute till the CHtmlView object gets detstroyed. this effect doesnt occur when we load our DLLs from within an new MFC app, built with VC++.NET, everything shuts down fine. due to the fact that there is n...

Inventory Adjustments with problems
Hi In this moment I have some journal entry in financial module with transactions that i never saw before. The bachumb is something like 'GLTRX024134', they are not sequencial. In the descriptn, this has a link to a transaction from inventory adjustment, but with a change... if for example the transaction from inventory is AJ00000007, in this reference is IVAAJ00000007, this is happening with the transfers too. Any idea is welcome!!! Thanks in advance ...

Attachment File Problem
hi my problem is , when i attachment any file to the new mail i can't attachment the file whyyyyyyyyyy i mean when we attachment any file to the mail must be automatic open new filed where it show us the attachnebt file ?????? but it's not happend in my system second problem when i recive any mail whit attachment file it gave me the message "OE REMOVED ACCESS TO THE FOLLOWING UNSAFE ATTACHMENTSIN YOUR MAIL" HELP Pls. thank's You'll need to be a lot more specific if you expect anyone to know what you're talking about - exact error message is? Post it in t...

CRM Security Problems
Hi Group, I have developed a windows service that hits the CRM database everynight to create some e-mails that need to be sent out to customers in the morning. Eventually these will be automatically sent, but for now, we want to manually send them in order to audit what is going out. Here is the problem. THe service is running under the same account as the installation was run under, integration account with full sysadmin. The e-mails are created by this account, however, the activity party xml is sent in to assign the e-mail to a particular user and even set that user as the owner of the e-...

Integrity Problems in PivotTables
Hi All, I have used this workbook for some time and it appears the same as many others I use, but lately after opening it a couple of times I receive an error message that - 1, "Cannot read file", followed by 2, all my pivotTables lose functionality "Due to Integrity Problems" and I have to reset all the ranges again. I am using 2003 version and the range in question for the first table is in another workbook on the server. TIA Roger. Hi Roger, (reply in excel.misc) I don't have Excel 2003, but you might double check the several pa...

Identified problem printing graphics #2
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Well Can anyone explain this latest miserable problem with MS Word 2008? When I print a large document to my HP 6MP printer, the document prints fine BUT ONLY WHEN I PRINT THE WHOLE DOCUMENT. The instant I print only a range of pages, it matters not if I start from the front or not, the graphics in the document do NOT print - even if they were generated by Word. Frankly I am sick with Microsoft's foisting off problematic software on us -- I only wish there were a real alternative choice! The real problem is that ...