Click here to Skip to main content
15,907,328 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralDifferences between value-of and apply-templates in XSLT Pin
Alfred Taylor13-Dec-02 21:01
Alfred Taylor13-Dec-02 21:01 
GeneralRe: Differences between value-of and apply-templates in XSLT Pin
Christian Graus13-Dec-02 21:43
protectorChristian Graus13-Dec-02 21:43 
GeneralRe: Differences between value-of and apply-templates in XSLT Pin
surehand14-Dec-02 2:16
surehand14-Dec-02 2:16 
GeneralRe: Differences between value-of and apply-templates in XSLT Pin
Christian Graus16-Dec-02 1:07
protectorChristian Graus16-Dec-02 1:07 
GeneralCache problem Pin
Anonymous12-Dec-02 23:41
Anonymous12-Dec-02 23:41 
GeneralRe: Cache problem Pin
Not Active13-Dec-02 3:24
mentorNot Active13-Dec-02 3:24 
QuestionHow to get the current line of a xml element / node? Pin
Daniel Strigl11-Dec-02 21:50
Daniel Strigl11-Dec-02 21:50 
AnswerRe: How to get the current line of a xml element / node? Pin
Michael A. Barnhart12-Dec-02 0:26
Michael A. Barnhart12-Dec-02 0:26 
Daniel,
First what do you mean by the current line. My assumption is that you mean the text value associated with an element node. Which happens to be the collection of child nodes to that element which are text nodes.

So look up in the help section that comes with MSXML4 (which I recommend if you do not have)

HRESULT get_childNodes(
IXMLDOMNodeList **childList);

and then look up TextNode. The first part from one of the sections returned is:

XML DOM Enumerated Constants
IXMLDOMNodeType enumerations specify valid settings for the Document Object Model (DOM) node type. The node type determines valid values and whether the node can have child nodes.

Values
The IXMLDOMNodeType enumeration defines the following valid values.

NODE_ELEMENT (1)
The node represents an element (its nodeTypeString property is "element"). An Element node can have the following child node types: Element, Text, Comment, ProcessingInstruction, CDATASection, and EntityReference. The Element node can be the child of the Document, DocumentFragment, EntityReference, and Element nodes.
NODE_ATTRIBUTE (2)
The node represents an attribute of an element (its nodeTypeString property is "attribute"). An Attribute node can have the following child node types: Text and EntityReference. The Attribute node does not appear as the child node of any other node type; it is not considered a child node of an Element.
NODE_TEXT (3)
The node represents the text content of a tag (its nodeTypeString property is "text"). A Text node cannot have any child nodes. The Text node can appear as the child node of the Attribute, DocumentFragment, Element, and EntityReference nodes.


So you get the list of child nodes and step through that list. Compare the node type of the child to "NODE_TEXT" (3) and you most of the way there.
Once you get the flavor it really does make sense.

"I will find a new sig someday."
GeneralRe: How to get the current line of a xml element / node? Pin
Daniel Strigl12-Dec-02 0:58
Daniel Strigl12-Dec-02 0:58 
GeneralRe: How to get the current line of a xml element / node? Pin
John M.12-Dec-02 7:20
John M.12-Dec-02 7:20 
GeneralRe: How to get the current line of a xml element / node? Pin
Daniel Strigl12-Dec-02 19:57
Daniel Strigl12-Dec-02 19:57 
GeneralRe: How to get the current line of a xml element / node? Pin
Michael A. Barnhart12-Dec-02 8:44
Michael A. Barnhart12-Dec-02 8:44 
QuestionHow to use format-number() function? Pin
amica5-Dec-02 5:15
amica5-Dec-02 5:15 
AnswerRe: How to use format-number() function? Pin
Bjoern Graf5-Dec-02 10:14
Bjoern Graf5-Dec-02 10:14 
GeneralIXMLDOMDocumentPtr and IXMLDOMDocument ?!?! Pin
Daniel Strigl4-Dec-02 1:57
Daniel Strigl4-Dec-02 1:57 
GeneralRe: IXMLDOMDocumentPtr and IXMLDOMDocument ?!?! Pin
Bjoern Graf4-Dec-02 4:29
Bjoern Graf4-Dec-02 4:29 
GeneralRe: IXMLDOMDocumentPtr and IXMLDOMDocument ?!?! Pin
Michael Dunn4-Dec-02 16:57
sitebuilderMichael Dunn4-Dec-02 16:57 
GeneralRe: IXMLDOMDocumentPtr and IXMLDOMDocument ?!?! Pin
Daniel Strigl4-Dec-02 19:57
Daniel Strigl4-Dec-02 19:57 
GeneralMSXML and CString !!! Pin
Daniel Strigl3-Dec-02 23:18
Daniel Strigl3-Dec-02 23:18 
GeneralRe: MSXML and CString !!! Pin
Daniel Turini3-Dec-02 23:55
Daniel Turini3-Dec-02 23:55 
GeneralRe: MSXML and CString !!! Pin
Daniel Strigl4-Dec-02 0:32
Daniel Strigl4-Dec-02 0:32 
GeneralRe: MSXML and CString !!! Pin
Retsof Nawor4-Dec-02 8:25
Retsof Nawor4-Dec-02 8:25 
GeneralRe: MSXML and CString !!! Pin
Daniel Strigl4-Dec-02 19:57
Daniel Strigl4-Dec-02 19:57 
Generalput_nodeTypedValue Pin
Bash28-Nov-02 2:37
Bash28-Nov-02 2:37 
GeneralRe: put_nodeTypedValue Pin
Christian Graus28-Nov-02 10:50
protectorChristian Graus28-Nov-02 10:50 

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.