Click here to Skip to main content
15,889,992 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionRe: How to resolve MSSOAP's Unspecified HTTP error.. Pin
led mike12-Nov-08 4:37
led mike12-Nov-08 4:37 
Questionname() function fails in MSXML Pin
Stone Free11-Nov-08 7:22
Stone Free11-Nov-08 7:22 
QuestionRe: name() function fails in MSXML Pin
led mike12-Nov-08 4:29
led mike12-Nov-08 4:29 
AnswerRe: name() function fails in MSXML Pin
Stone Free12-Nov-08 7:22
Stone Free12-Nov-08 7:22 
GeneralRe: name() function fails in MSXML Pin
led mike12-Nov-08 7:29
led mike12-Nov-08 7:29 
GeneralRe: name() function fails in MSXML [modified] Pin
Stone Free13-Nov-08 0:56
Stone Free13-Nov-08 0:56 
GeneralRe: name() function fails in MSXML Pin
led mike13-Nov-08 6:54
led mike13-Nov-08 6:54 
GeneralRe: name() function fails in MSXML [modified] Pin
Stone Free13-Nov-08 7:11
Stone Free13-Nov-08 7:11 
Stone Free wrote:
name(/find:ResponseEnv/find:Bodies/node())



led mike wrote:
I have never seen name() used like that and I have no idea what this "find:" is nor can I find it referenced on www.w3schools.com. If that is newer XPath then of course it's not going to be supported in old DOMs like MSXML.

Mike,

find: won't be referenced at www.w3schools.com, because it is a namespace alias.

Take /ResponseEnv/Bodies/node() for example, this would work fine if my XML had been as follows:

<responseenv>
	<header schemaversion="1.1">
		<field1/>
	</header>
	<bodies>
		<response>
			<field1/>
		</response>
	</bodies>
</responseenv>

Unfortunately it has a namespace attached to it of http://example.

To make the XPath work successfully I had to use the SelectionNamespaces property. I could have made the alias anything. I could have written the following:

hr = domDoc->setProperty(_bstr_t("SelectionNamespaces"),_variant_t(_bstr_t("xmlns:codeproject=\"http://example\"")));

This would mean my XPath would have been /codeproject:ResponseEnv/codeproject:Bodies/node()
led mike wrote:
I have never seen name() used like that

I got that syntax:

  • name(): Returns the qualified name of the context node.
  • name(node_set): Returns the qualified name of the first node in the given node set object.
From http://www.herongyang.com/xml/xpath_2.html[^]
led mike wrote:
I don't know if you are using the XPath statement in XSLT or not but name() returns a string not a node which is why the error message says what it says. After seeing your XPath statements I don't have clue what you are trying to do.


No the XPath statement is being used directly from the XML Document. The node identified with <response></response> will not actually be called response, but can be a number of different sub-messages and so I don't know in advance what it will be only that it will be the first node found that is a child of bodies
GeneralRe: name() function fails in MSXML Pin
led mike17-Nov-08 4:55
led mike17-Nov-08 4:55 
AnswerRe: name() function fails in MSXML Pin
George L. Jackson13-Nov-08 8:57
George L. Jackson13-Nov-08 8:57 
QuestionRetrieve Data from another webpage besides XML Pin
Bad Programmer10-Nov-08 21:32
Bad Programmer10-Nov-08 21:32 
AnswerCross Post Pin
led mike12-Nov-08 4:35
led mike12-Nov-08 4:35 
GeneralRe: Cross Post Pin
Bad Programmer14-Nov-08 8:11
Bad Programmer14-Nov-08 8:11 
QuestionI need to know xml tags for some formats in word2007 Pin
hatan868-Nov-08 17:09
hatan868-Nov-08 17:09 
QuestionRe: I need to know xml tags for some formats in word2007 Pin
led mike12-Nov-08 4:33
led mike12-Nov-08 4:33 
Questionwhat is the benefit of schema over DTD ? Pin
Ahmed R El Bohoty7-Nov-08 8:47
Ahmed R El Bohoty7-Nov-08 8:47 
AnswerRe: what is the benefit of schema over DTD ? Pin
led mike12-Nov-08 4:32
led mike12-Nov-08 4:32 
QuestionXML Innertext Add's all my nodes! What am i doing wrong? Pin
MegaBlasterX5-Nov-08 23:16
MegaBlasterX5-Nov-08 23:16 
AnswerRe: XML Innertext Add's all my nodes! What am i doing wrong? Pin
led mike6-Nov-08 4:30
led mike6-Nov-08 4:30 
AnswerRe: XML Innertext Add's all my nodes! What am i doing wrong? Pin
leejs4136-Nov-08 14:27
leejs4136-Nov-08 14:27 
QuestionQuestion about Convert XML to DataTable Pin
leejs4135-Nov-08 15:10
leejs4135-Nov-08 15:10 
QuestionProblems with XSL Patterns Pin
saanj5-Nov-08 0:10
saanj5-Nov-08 0:10 
QuestionUsing xs:Pattern like sql "Like" statement Pin
saanj4-Nov-08 23:45
saanj4-Nov-08 23:45 
Questionwant to see "&lt;" and "&gt;" instead of "&gt" and "&lt" Pin
idoyohanan4-Nov-08 1:19
idoyohanan4-Nov-08 1:19 
AnswerRe: want to see "&lt;" and "&gt;" instead of "&gt;" and "&lt;" Pin
harold aptroot7-Nov-08 9:17
harold aptroot7-Nov-08 9:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.