Hi all
This may be considered by _some_ as NF, but here goes
I have the following code:
loXML = Createobject('MSXML2.DomDocument') loXML.loadXML(lcXML) lcolElements = loXML.GetElementsByTagName("Bank") For Each loElement In lcolElements ? loElement.Attributes.Item(0).Text Etc/usw
Part of the XML looks like this
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
The code above returns "None" - without the leading space. I have tried replacing the leading space with   but it is still stripped off. I tried replacing the leading space with and the XML fails to load at all.
loXML.PreserveWhiteSpace = .T. seems to apply to all white space not just that between the quote marks and that messes things up completely.
Any ideas/suggestions would be much appreciated
Paul Newton
On Fri, Apr 8, 2016 at 8:42 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
This may be considered by _some_ as NF, but here goes
I have the following code:
loXML = Createobject('MSXML2.DomDocument')
Looks like FoxPro code to me... dunno why it would be NF.
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
So, you need the prefixed blank spaces in the name value preserved?
Thanks for your reply Ted
In answer to your question, yes (but _please_ don't ask why <g>)
Paul Newton
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: 08 April 2016 15:24 To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
On Fri, Apr 8, 2016 at 8:42 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
This may be considered by _some_ as NF, but here goes
I have the following code:
loXML = Createobject('MSXML2.DomDocument')
Looks like FoxPro code to me... dunno why it would be NF.
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
So, you need the prefixed blank spaces in the name value preserved?
[excessive quoting removed by server]
On Fri, Apr 8, 2016 at 10:46 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Thanks for your reply Ted
In answer to your question, yes (but _please_ don't ask why <g>)
Me? Do I do that? <g>
:)
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: 08 April 2016 16:01 To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
On Fri, Apr 8, 2016 at 10:46 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Thanks for your reply Ted
In answer to your question, yes (but _please_ don't ask why <g>)
Me? Do I do that? <g>
[excessive quoting removed by server]
On Fri, Apr 8, 2016 at 10:46 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
So, you need the prefixed blank spaces in the name value preserved?
As best as I can figure, this is all that's known about the subject:
I'd take a look at casting xml:space=preserve directly in the bank element, to see if that would like you find the spaces in the name while not messing up the rest of the document structure.
But there's a few other links there that might have better suggestions. The stackoverflow link is pretty confusing, but using the nodeValue link instead of the Text might do the trick.
Thanks Ted
I'll look into that on Monday
Paul
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: 08 April 2016 16:09 To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
On Fri, Apr 8, 2016 at 10:46 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
So, you need the prefixed blank spaces in the name value preserved?
As best as I can figure, this is all that's known about the subject:
I'd take a look at casting xml:space=preserve directly in the bank element, to see if that would like you find the spaces in the name while not messing up the rest of the document structure.
But there's a few other links there that might have better suggestions. The stackoverflow link is pretty confusing, but using the nodeValue link instead of the Text might do the trick.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
Brilliant Ted ! NodeValue did the trick
Thanks again
Paul
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: 08 April 2016 16:09 To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
On Fri, Apr 8, 2016 at 10:46 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
<Bank id="1" name=" None" styleid="0" ></Bank> Note the leading space
So, you need the prefixed blank spaces in the name value preserved?
As best as I can figure, this is all that's known about the subject:
I'd take a look at casting xml:space=preserve directly in the bank element, to see if that would like you find the spaces in the name while not messing up the rest of the document structure.
But there's a few other links there that might have better suggestions. The stackoverflow link is pretty confusing, but using the nodeValue link instead of the Text might do the trick.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
Yeah - but as a Ref Librarian - you would not have been paid so nicely as you are from being a Techie!
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: Friday, April 08, 2016 11:54 AM To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
I was pretty convinced that with the right 3 words, you could find most anything you needed with Google on the first page of hits. Still works pretty well, but not as good as it used to.
Fred
On Fri, Apr 8, 2016 at 8:53 AM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
On Fri, 8 Apr 2016, at 05:12 PM, Fred Taylor wrote:
I was pretty convinced that with the right 3 words, you could find most anything you needed with Google on the first page of hits.
Gotta love that MapReduce.
Use to play LEAST number of results from a query where top # had to drink. There were rules defined as to what you could search with quotes and all.
On Fri, Apr 8, 2016 at 11:12 AM, Fred Taylor fbtaylor@gmail.com wrote:
I was pretty convinced that with the right 3 words, you could find most anything you needed with Google on the first page of hits. Still works pretty well, but not as good as it used to.
Fred
On Fri, Apr 8, 2016 at 8:53 AM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
I'm still surprised when I get 0 hits on a search. That seems almost impossible!
Fred
On Fri, Apr 8, 2016 at 11:03 AM, Stephen Russell srussell705@gmail.com wrote:
Use to play LEAST number of results from a query where top # had to drink. There were rules defined as to what you could search with quotes and all.
On Fri, Apr 8, 2016 at 11:12 AM, Fred Taylor fbtaylor@gmail.com wrote:
I was pretty convinced that with the right 3 words, you could find most anything you needed with Google on the first page of hits. Still works pretty well, but not as good as it used to.
Fred
On Fri, Apr 8, 2016 at 8:53 AM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton <
Paul.Newton@pegasus.co.uk>
wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
Stephen - are you serious? You played a Beer drinking game w/friends based upon Google - as opposed to - say - Beer Pong - or bouncing a Quarter?
Damn - gotta say - Techie people come up with Weird Shit sometimes!
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Stephen Russell Sent: Friday, April 08, 2016 2:04 PM To: profoxtech@leafe.com Subject: Re: MSXML.DomDocument
Use to play LEAST number of results from a query where top # had to drink. There were rules defined as to what you could search with quotes and all.
On Fri, Apr 8, 2016 at 11:12 AM, Fred Taylor fbtaylor@gmail.com wrote:
I was pretty convinced that with the right 3 words, you could find most anything you needed with Google on the first page of hits. Still works pretty well, but not as good as it used to.
Fred
On Fri, Apr 8, 2016 at 8:53 AM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 11:15 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Brilliant Ted ! NodeValue did the trick
Cool, glad to hear it!
My superpower seems to be in phrasing questions in such a way that the Great Seach Engine in The Sky yields the correct answer out of 14,000 hits found. I would have made a killer reference librarian somewhere.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
[excessive quoting removed by server]
On Fri, Apr 8, 2016 at 2:51 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Damn - gotta say - Techie people come up with Weird Shit sometimes!
There's an official sport: GoogleWhacking! http://www.googlewhack.com/
Yep that was it. Two words no punctuation. It was easy on a phone or a tablet instead of needing a pc and monitor space wise.
On Fri, Apr 8, 2016 at 3:14 PM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 2:51 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Damn - gotta say - Techie people come up with Weird Shit sometimes!
There's an official sport: GoogleWhacking! http://www.googlewhack.com/
[excessive quoting removed by server]
Ok - gotta say - U guys crack me up - as I sit here on LIRR train after finishing my beer! How apropos...
:-) -K-
Sent from my iPhone
On Apr 8, 2016, at 4:29 PM, Stephen Russell srussell705@gmail.com wrote:
Yep that was it. Two words no punctuation. It was easy on a phone or a tablet instead of needing a pc and monitor space wise.
On Fri, Apr 8, 2016 at 3:14 PM, Ted Roche tedroche@gmail.com wrote:
On Fri, Apr 8, 2016 at 2:51 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Damn - gotta say - Techie people come up with Weird Shit sometimes!
There's an official sport: GoogleWhacking! http://www.googlewhack.com/
[excessive quoting removed by server]