f



select nodes with child node A and child node B

I have an XML document that has multiple childe nodes like the one at
the end of this message

What syntax would I use with selectNodes to select all viewentry nodes
that have an

entrydata child node with a name attribute equal to
"CourseOrMeetingName"
that has a text childe node with the text Course ABC

AND that also have an

entrydata child with a name attribute equal to Start Date
that has a datetime child node with the text 20070110

I was trying something like

//viewentry[ (entrydata[@name='CourseOrMeetingName'][text='Course
ABC']) and (entrydata[@name='StartDate'][datetime='20070110'])]"

<viewentry position="1" unid="E5FE575692CAB4CD852572140052F751"
noteid="893A" siblings="24">
<entrydata columnnumber="0" name="CourseOrMeetingName">
<text>Course ABC</text></entrydata>
<entrydata columnnumber="1" name="StartDate">
<datetime>20070110</datetime></entrydata>
<entrydata columnnumber="2" name="City">
<text>West chester</text></entrydata>
<entrydata columnnumber="3" name="FirstName">
<text>Joe</text></entrydata>
<entrydata columnnumber="4" name="MiddleName">
<text></text></entrydata>
<entrydata columnnumber="5" name="LastName">
<text>Blow</text></entrydata>
</viewentry>

Thanks,

Glenn

0
gplott (1)
11/1/2006 8:57:38 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

1 Replies
711 Views

Similar Articles

[PageSpeed] 44

gplott@yahoo.com wrote:
> //viewentry[ (entrydata[@name='CourseOrMeetingName'][text='Course
> ABC']) and (entrydata[@name='StartDate'][datetime='20070110'])]"

Works just fine when I try it on your sample fragment, using Xalan:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
	  <xsl:copy-of select="//viewentry[ 
(entrydata[@name='CourseOrMeetingName'][text='Course ABC']) and 
(entrydata[@name='StartDate'][datetime='20070110'])]"/>
	</xsl:template>
</xsl:stylesheet>

Output is
<?xml version="1.0" encoding="UTF-8"?><viewentry position="1" 
unid="E5FE575692CAB4CD852572140052F751" noteid="893A" siblings="24">
<entrydata columnnumber="0" name="CourseOrMeetingName">
<text>Course ABC</text></entrydata>
<entrydata columnnumber="1" name="StartDate">
<datetime>20070110</datetime></entrydata>
<entrydata columnnumber="2" name="City">
<text>West chester</text></entrydata>
<entrydata columnnumber="3" name="FirstName">
<text>Joe</text></entrydata>
<entrydata columnnumber="4" name="MiddleName">
<text/></entrydata>
<entrydata columnnumber="5" name="LastName">
<text>Blow</text></entrydata>
</viewentry>

-- 
() ASCII Ribbon Campaign  | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
0
11/1/2006 9:27:25 PM
Reply:

Similar Artilces:

problem with child text node when constraining other child node types
I'm struggling with whether or not it is possible to represent the following construct in a dtd. I have an element X that I want to contain 3 types of child elements. Child Element A should have a 0 or 1 constraint, Child element B should have a 0-n constraint. I also want X to be able to contain text, resulting in xml that the following <X> <A/> <B/> <B/> child text of element X also possible </X?> I've got the following, but can't seem to figure out a way to also allow for a text child node. Any help appreciated <!ELEMENT X (A?, B*)> Bryan Bryan Ax wrote: > I've got the following, but can't seem to figure out a way to also > allow for a text child node. Any help appreciated Declare X as having mixed content. http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-mixed-content Looking at this, I don't see a way to constrain it so that A only can appear once, whereas B can appear multiple times...I think I'm missing something. Upon further reading, there doesn't appear to be a way to do this. Either I go to mixed-content, which is less constraining, or I need to add a child node to hold the text element. http://www.devguy.com/fp/XML/dtd.htm Bryan Ax wrote: > I have an element X that I want to contain 3 types of child elements. > Child Element A should have a 0 or 1 constraint, Child element B should > have a 0-n constraint. I also want X to be able to contain text, All you can do ...

Get XML values from nodes and child nodes
Hi everybody. My XML file is: <Locatore> <NumeroProgressivo>001</NumeroProgressivo> <CodiceFiscale>CSTNDA69P90H523R</CodiceFiscale> <PersoneFisiche> <Cognome>CAST</Cognome> <Nome>NADIR</Nome> <Sesso>F</Sesso> <DataNascita>10091979</DataNascita> <ComuneNascita>RONCA</ComuneNascita> <ProvinciaNascita>BL</ProvinciaNascita> </PersoneFisiche> </Locatore> <Locatore> <NumeroProgressivo>002</NumeroProgressivo> <CodiceFiscale>PRSGRI74L29F443L</CodiceFiscale> <PersoneFisiche> <Cognome>PERISSI</Cognome> <Nome>IGOR</Nome> <Sesso>M</Sesso> <DataNascita>29071970</DataNascita> <ComuneNascita>MONTE</ComuneNascita> <ProvinciaNascita>SA</ProvinciaNascita> </PersoneFisiche> </Locatore> I need to get in ONE RECORD, both node value and his child nodes values, like this 001 | CSTNDA69P90H523R | CAST | NADIR | F | 10091979 | RONCA | BL 002 | PRSGRI74L29F443L | PERISSI | IGOR | M | 29071970 | MONTE | SA ..... With this: SELECT X.valore.query('NumeroProgressivo').value('.', 'VARCHAR(20)') as NumeroProgressivo, X.valore.query('CodiceFiscale').value('.', 'VARCHAR(16)') as CodiceFiscale FROM Tbulk CROSS APPLY Tbulk.nodes('Fornitura/Documento/S...

Selecting Nodes Using Subtotal of Child Nodes
I'm having difficulty finding the correct syntax that will allow me to select a group of invoices based on the total of an amount column located in its line items. Below are simplified examples of my XML and XSLT files: XML FILE <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="OutstandingInvoiceBalances.xslt"?> <ProgramData> <Invoices> <InvoiceID>1</InvoiceID> <InvoiceNumber>100</InvoiceNumber> <Amount>1000.00</Amount> </Invoices> <Invoices> <InvoiceID>2</InvoiceID> <InvoiceNumber>101</InvoiceNumber> <Amount>2000.00</Amount> </Invoices> <Invoices> <InvoiceID>3</InvoiceID> <InvoiceNumber>102</InvoiceNumber> <Amount>3000.00</Amount> </Invoices> <InvoiceLineItems> <InvoiceLineItemID>1</InvoiceLineItemID> <InvoiceID>1</InvoiceID> <AmountToPay>0</AmountToPay> </InvoiceLineItems> <InvoiceLineItems> <InvoiceLineItemID>2</InvoiceLineItemID> <InvoiceID>2</InvoiceID> <AmountToPay>100</AmountToPay> </InvoiceLineItems> <InvoiceLineItems> <InvoiceLineItemID>3</InvoiceLineItemID> <InvoiceID>2</InvoiceID> <AmountToPay>200</AmountToP...

XSL select only nodes which contain a specific child node
Given the following extremely simplified XML... <AA> <BB></BB> <BB><CC>foo</CC></BB> <BB></BB> <BB><CC>bar</CC></BB> </AA> ....is there an easy way to use and XSL select to get only the <BB> nodes which have a <CC> child node? <xsl:for-each select="AA/BB"> Gives me 4 nodes: <BB></BB> <BB><CC>foo</CC></BB> <BB></BB> <BB><CC>bar</CC></BB> <xsl:for-each select="AA/BB/CC"> Gives me 2 nodes, but it's at the CC level and I need it to be at the BB level because there's a bunch of other nodes there that need to be processed as well. <CC>foo</CC> <CC>bar</CC> I'm thinking that there must be some sort of conditional select XPATH that will get me what I need: <BB><CC>foo</CC></BB> <BB><CC>bar</CC></BB> Any tips? William Krick wrote: > Given the following extremely simplified XML... > > <AA> > <BB></BB> > <BB><CC>foo</CC></BB> > <BB></BB> > <BB><CC>bar</CC></BB> > </AA> > > ...is there an easy way to use and XSL select to get only the <BB> > nodes which have a <CC> child node? > > <xsl:for-each select="AA/BB"> ...

selecting nodes between other nodes
Hi! <root> <foo>bar</foor> <blah /> <blah2 /> <a> <b /> <c /> </> </root> I want to select everything between <foo> and <a>. Is this possible? Timo In article <2jbjjhFvf4ttU1@uni-berlin.de>, Timo Nentwig <tcn@spamgourmet.org> wrote: % <root> % <foo>bar</foor> % <blah /> % <blah2 /> % <a> % <b /> % <c /> % </> % </root> % I want to select everything between <foo> and <a>. Is this possible? How about <xsl:stylesheet xmlns:xsl = 'http://www.w3.org/1999/XSL/Transform' version = '1.0'> <xsl:template match='*[preceding-sibling::foo and following-sibling::a]'> <xsl:copy-of select = '.'/> </xsl:template> <xsl:template match='text()'/> </xsl:stylesheet> ? -- Patrick TJ McPhee East York Canada ptjm@interlog.com ...

XSLT Child node of a specific node
Hi All, I would like to use XSLT to replace all <u> nodes that are children of a <b> node with a new <heading> node. Also, if the <b> node has no other children than remove it as well. For example: This would be some <b><u>Text</u></b>. It could <b> also maybe be like <u>this</u>...</b> to This would be some <heading>Text</heading>. It could <b> also maybe be like <heading>this</heading>...</b> I've been trying something like: <xsl:template match="//b[u]"> ... </xsl:template> with no success. Could someone point me in the right direction? Thanks! On 2006-10-20, gregmcmullinjr@gmail.com <gregmcmullinjr@gmail.com> wrote: > Hi All, > > I would like to use XSLT to replace all <u> nodes that are children of > a <b> node with a new <heading> node. Also, if the <b> node has no > other children than remove it as well. > For example: > > > This would be some <b><u>Text</u></b>. It could <b> also maybe be like ><u>this</u>...</b> > > to > > This would be some <heading>Text</heading>. It could <b> also maybe be > like <heading>this</heading>...</b> > > I've been trying something like: > ><xsl:template match="//b[u]"> > ... ></xsl:template&...

Extracting the first child node of a parent node
Hei, I have the following xml file and I have tried to write xslt to extract only the values of the first "record" node. It does not work. I need some help. I used ---- to represent indent. Xml: <?xml version="1.0" encoding="UTF-8"?> <OAI-PMH xmlns="http://www.openarchives.....OAI/2.0/OAI-PMH.xsd"> ---<responseDate>2008-02-19T12:54:06Z</responseDate> ---<request xmlns="" verb="ListRecords" ......o.no</request> ---<ListRecords xmlns=""> -----<record> <!----the first record node I want to extract --> -------<header> ----------<identifier>oai:frida.uio.no:110517</identifier> ----------<datestamp>2004-12-16</datestamp> ----------<setSpec>UITT</setSpec> -------</header> ..... -----</record> <!-- end of the first record node I want to extract ---> -----<record> .......... -----</record> ........... ---</ListRecords> </OAI-PMH> xslt: <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:template match="/ListRecords" > <xsl:apply-templates select="child::node()[1]"/> </xsl:template> <xsl:template match="record"> <xsl:value-of select="*" /...

XSLT Select nodes without text-node children whose names starts with specifix text
Question on XSL expression Got this XML: <Body> <Page> <Line no="9" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="10" detail="true"> <onefield>onefieldstext</onefield> <fgman9>fgmanfieldstext</fgman9> <twofield>twofieldstext</twofield> </Line> <Line no="11" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="12" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="13" detail="true"> <onefield>onefieldstext</onefield> <fgman5>fgmanfieldstext</fgman5> <twofield>twofieldstext</twofield> </Line> <Line no="14" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> </Page> </Body> I would select the <Line/> nodes without text-node children whose names is starting with "fgman" - in this example it is all <Line/> _except_ <fgman9/> and <fgman5/> in <Line/> with @no of 10 and 13. I know that this works: &...

XML Node, HTML Node
hi guys, how can distinguish between XML Node and HTML Node, using attributes or method .. thanks . alhalayqa wrote: > how can distinguish between XML Node and HTML Node, using attributes or > method .. In the XML DOM nodes do not have an id property or a className property while in the HTML DOM nodes do have those properties. On the other hand there are specializations of the XML DOM like the SVG DOM where id or className are properties too. Thus if you parse XML with namespaces with browsers like Mozilla or Opera the parser recognizes namespaces like the XHTML 1 namespace o...

Why treat text nodes as nodes?
One of the things I find most unnatural about most XML APIs is that they try to abstract both elements and text into some kind of "node" object when they have virtually nothing in common. The reason these APIs do it is to make it possible for both text and elements to be children of elements. But there is another way. The XPath/XQuery data model does not allow two consecutive text nodes. As far as I can tell, most XML processing software automatically merges consecutive text nodes. This means that the number of text segments directly under an element is bound by the number of sub-elements plus 1 (PIs and comments may be treated as "pseudo-elements" for this purpose). As a result, it is always possible to associate each text segment with the element immediately preceding it within the parent and associate the first text element with the parent itself. No more text nodes. The only API I know that uses this trick is the ElementTree API for Python by Fredrik Lundh (http://effbot.org/zone/element-index.htm). Each Element object has a text and tail property for the text immediately inside the element and text following it within its parent element. Elements always have a tag, attributes and and zero or more children - which are always other elements. No mixed types. The text and tail attributes are always strings. This model should be very convenient for statically-typed languages like Java or C++. I find it ironic that this idea is probably used only in Pyt...

Child Nodes Selection
Hi all, Is it possible to 'cherry-pick' child nodes but retain their parentage. Given an example... <user> <first_name>George</first_name> <sur_name>George</sur_name> <dob>George</dob> <title>Line Manager</title> </user> I would like to obtain a node-set that gives me... <user> <first_name>George</first_name> <sur_name>George</sur_name> </user> I am trying to achieve this is a single XPATH expression, creating a variable to hold my new smaller node-set. I am trying to make my stylesheets less memory intensive by only focusing on those elements I am interested. Effectively working with smaller records. Any assistance is very appreciated, Bryan Galvin In article <971bc529.0410080743.6792128d@posting.google.com>, Bryan Galvin <bryan_galvin@hotmail.com> wrote: >Is it possible to 'cherry-pick' child nodes but retain their >parentage. No. >I am trying to achieve this is a single XPATH expression XPath is a way of identifying (by "paths") nodes in a document. It can never return a node that is not in the input. You need to create a new element with the children you want, or modify an existing node, and XPath cannot do either of these things. -- Richard Richard, As I suspected. From all my experience of XPATH and XSLT I could not see how it was feasable. I have embarked on an alternative path where the nodes I requi...

xsl variable $node/text() but $node can non-node-set help!
I have a variable $value as a parameter in the following template: <xsl:template name="myTemplate"> <xsl:param name="value"/> <xsl:if test="$value"> <xsl:value-of select="$value"/> </xsl:if> </xsl:template> Now i call myTemplate sometimes whit the a parameter $value that is sometimes a text node, and sometimes it is not even a node. Example: <inputDoc> <a>hello</a> <a/> </inputDoc> xsl: <xsl:for-each select="/inputDoc/a"> <xsl:call-template name="myTemplate"> <xsl:with-param name="value" select="./text()"/> </xsl:call-template> </xsl:for-each> So i call myTemplate with parameter $value=a/text() But for the second <a> element in <inputDoc> there is not text() node. This gives me the following error: Cause: javax.xml.transform.TransformerException: The value is not a node-set With line number of the error pointing to the xsl:if in myTemplate. No i tried the function nilled(), but that is XPath 2.0, i only use XPath 1.0 and XSL 1.0 i know a possible solution is this: <xsl:for-each select="/inputDoc/a"> <xsl:choose> <xsl:when test=".[not(node())]"> <xsl:call-template name="myTemplate"> <xsl:with-param name="value" select="false()"/> </xsl:call-template> <...

Problem updating an attribute that appears in both root node and child node!
Hi I have an attribute the appears in both the root node and child node for example, below the attribute VERSION appears in the rood node (PRODMSG ) and a child node (OPERATION ) ================ INPUT XML ================ <?xml version="1.0" encoding="utf-16"?> <PRODMSG VERSION="1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="00051004_20070503024353"> <HEADER> <OPERATION NAME="PRICE" VERSION="1.2"> <USERNAME>SMITGHJ</USERNAME> <HOSTNAME>00051004</HOSTNAME> <DATETIME>2007-05-03T01:30:16.710</DATETIME> </OPERATION> </HEADER> </PRODMSG> However all I want to do is update the root node (PRODMSG) VERSION attribute to 2.0 but leave the child node version untouched. Problem is if I select the PRODMSG and it's attributes and update the version to 2.0 ....... <xsl:template match="@VERSION|PRODMSG"> <xsl:attribute name="VERSION">2.0</xsl:attribute> </xsl:template> ...... I get nothing but if I do this ....... ================ TRANSFORM ================ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:output method="xml" version=&...

change the icon of a JTree parent node according to its child nodes
Dear All I am using SWING , JTree , in a software app. to monitor some hardware devices using SNMP I am organizing the devices in a JTree subclass I have a parent node with some child nodes I need to change the parent-node's icon according to some conditions in its child-nodes for example : when a child-node.getX() > 1000 then its parent-node.icon should be changed I think that I need to handle the paint of the parent-node but I don't know how ? Do I need to have subclasses of TreeNode for both Parent and Child nodes ?? I am using the MutableTreeNode for all my nodes ! Than...

need a help to create XML node with text and sub child.
Hi folks I need a help to create XML node with text and sub child. -------------------------------------------------------- I want to create "ADDR" node with text and child node. (First child node and then text.) <?xml version="1.0" encoding="UTF-8" ?> - <ROOT> - <NODE> <child-1 attr="attr-value">This is child text</child-1> - <ADDR> <postcode>12345</postcode> Address information </ADDR> </NODE> </ROOT> -------------------------------------------------------- I can create "ADDR" node with text and child node. But first text and then child node. I can not change the location of text and child node of "ADDR" node. <?xml version="1.0" encoding="UTF-8" ?> - <ROOT> - <NODE> <child-1 attr="attr-value">This is child text</child-1> - <ADDR> Address information <postcode>12345</postcode> </ADDR> </NODE> </ROOT> ------------------------------------------------------------------------------------ This is code which I did (ASP) ------------------------------------------------------------------------------------ Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM") If (xmlDoc.childNodes.length = 0) Then Set objProcInstr = xmlDoc.createProcessingInstruction("xml", "version=""1.0"" encoding...

Inserting Nodes between Nodes
Hi, XML novice here with another question. I need to add a XML node like, [code] <child01> <child02> <text></text> <image>image 1</image> <image>image 2</image> </child02> </child01> [/code] into this node between the ending </child01> and beginning <child01> of the [code] <child01> <child02> <text></text> <image>image 1</image> <image>image 2</image> </child02> </child01> <child01> <child02> <text></text> <image>image 1</image> <image>image 2</image> </child02> </child01> [/code] Does this make sense? I guess im looking for a way to say/do... make a new node with the following values and place it between these other two nodes. I still am learning XML but i think this can be done. On Jan 21, 12:34 am, cesarcesar <ce...@empiresolutions.net> wrote: > Hi, > > XML novice here with another question. I need to add a XML node like, > > [code] > <child01> > <child02> > <text></text> > <image>image 1</image> > <image>image 2</image> > </child02> > </child...

Text nodes and element nodes query
Hi all, The code below gets me a list of all the nodes within the node object called xml_tags_root. NodeList nl = xml_tags_root.getChildNodes(); The length of nodelist I get is double the number of actual elements! This is because after every element node there is text node which is (I think) the whitespace in the XML document. Is there a way to get only the element nodes? Please advice. thanks, ASD Hi, Look at getElementsByTagName(....) Regards, Arnaud "asd" <arvindsd@yahoo.com> a �crit dans le message news: 1116833345.887839.95270@g47g2000cwa.googlegroups.com... &...

Reality check: Is it sensible to link XML nodes to other XML nodes in the same file?
I've got a whole list of descriptions of stages in a production process, which are organised as a sequence of steps, with some branching (i.e. a sort of flow chart)... and thought I'd try and get with the times and model the data using XML! I'm hoping I'll eventually be able to display each 'step' (node) on it's own Web page, and show what link comes next. Is this a sensible thing to attempt to do? If so, how do I link to other nodes in the XML file? Should the <link> be to another node's <id>? And will each node need a 'friendly' <name>, too? (As you've probably gathered, this is all quite new to me...) Any advice or examples would be gratefully received. Gavnosis ...

node-node adjacency matrix to a node-arc adjacency matrix
I have been trying to figure out how to create a arc-node adjacency matrix from a node-node adjacency matrix, for example: node-node adj A = [0 1 0 1 1; 0 0 1 1 0; 0 0 0 1 1; 0 0 0 0 1; 0 0 0 0 0]; looking for the following links: 1-2,1-4,1-5,2-3,2-4,3-4,3-5,4-5 arc-node adj B =[ 1 1 1 0 0 0 0 0 -1 0 0 1 1 0 0 0 0 0 0 -1 0 1 1 0 0 -1 0 0 -1 -1 0 1 0 0 -1 0 0 0 -1 -1]; Any help will be greatly appreciated: I have tried to develop a for loop using "A" and assigning -1 to the tail end of the link but with no succes...

Selecting a node with child and parent condition.
<DeliverySchedule> <Header> <DistributorCode>MC</DistributorCode> <TransmissionDate>2007-01-02</TransmissionDate> <TransmissionTime>14:02:00.000</TransmissionTime> </Header> <Detail> <StoreDelivery> <SiteNum>001507</SiteNum> <DSchedule> <Order> <Date>2007-09-02</Date> <Time>08:02:01.000</Time> </Order> <Delivery> <Date>2007-09-03</Date> <Time>06:12:02.000</Time> </Delivery> </DSchedule> <DSchedule> <Order> <Date>2007-09-04</Date> <Time>08:02:03.000</Time> </Order> <Delivery> <Date>2007-09-05</Date> <Time>06:12:04.000</Time> </Delivery> </DSchedule> </StoreDelivery> <StoreDelivery> <SiteNum>001510</SiteNum> <DSchedule> <Order> <Date>2007-09-02</Date> <Time>08:02:05.000</Time> </Order> <Delivery> <Date>2007-09-03</Date> <Time>06:12:06.000</Time> </Delivery> </DSchedule> <DSchedule> &...

How to find non-existing nodes or nodes with no text
Ok, this must be simple but the more i search the more i don't find. It's about SimpleXML and PHP. How to find non-existing nodes or nodes with no text My XML file looks a little bit like this: i.e. 1 <discography> <CD> <title></title> <year>1978</year> </CD> </discography> i.e. 2: <discography> <CD> <year>1978</year> </CD> </discography> In i.e. 1, the tag <title> is empty. How do i test for empty tags in PHP? In i.e. 2, the tag <title> doesn't even exist. How do i ...

Extracting child nodes data from XML to Matlab
Hi, I want to extract the values of x, y and z from an xml file (sample below) to matlab. Can someone please guide me on this. Thanks <?xml version="1.0" encoding="UTF-8"?> -<Start> <id>EE542</id> <name>EE542</name> -<position_list> -<Position> <x>5.772</x> <y>7.239</y> <z>1</z> <time>19:31</time> </Position> </Position> </position_list> </Start> ...

XPATH: Selecting child nodes wich are NOT equal to
Hello, suppose i have a dom like this: <a> - <b> - <b> - <d> - </b> - <c> - <e/> - </c> - <f/> </a> now to select al f child nodes of a, is : a[f] but how do i select all child nodes of a that are not equeal to f?? a[!f] does not work. How do i do that??!?!?! Tjerk Wolterink wrote: > Hello, > > suppose i have a dom like this: > > <a> > - <b> > - <b> > - <d> > - </b> > - <c> > - <e/> > - </c> > - <f/> > </a> > > > now to select al f child nodes of a, is : a[f] > > but how do i select all child nodes of a that are not equeal to f?? > > a[!f] does not work. > > How do i do that??!?!?! is it this? a[child:* != f] Hi, >> suppose i have a dom like this: >> >> <a> >> - <b> >> - <b> >> - <d> >> - </b> >> - <c> >> - <e/> >> - </c> >> - <f/> >> </a> >> >> >> now to select al f child nodes of a, is : a[f] That's not correct actually. It should be a/f >> but how do i select all child nodes of a that are not equeal to f?? >> >> a[!f] does not work. >> >> How do i do that??!?!?! > > is it this? > > a[child:* != f] > No, what you need is: a/*[not(self::f)] or a/*[local...

Select Node Using position or value of another node.
Hi, I'm trying to get the value of another node using the position of another node or the name of the tag. Such that the current node is one of the contacts child nodes sec or prim and doing <xsl:value-of select="//cust[seq = position()]/name"/> Should return jon for the prim tag and peter for the sec tag, but fails as position() appears to resolve to the position of cust not the contacts node alternatively I would like to do something like <xsl:value-of select="//cust[seq = [name()='prim' then 0 else 1]]/name"/> <custs> <cust> <seq>0</seq> <name>jon</seq> </cust> <cust> <seq>1</seq> <name>peter</seq> </cust> <contacts> <prim> <message>hello</message> </prim> <sec> <message>hello</message> </sec> </contacts> </custs> Eddy C wrote: > Hi, > > I'm trying to get the value of another node using the position of > another node or the name of the tag. For the difference between tags and elements, see the XML FAQ at http://xml.silmaril.ie/authors/makeup/ > Such that the current node is one of the contacts child nodes sec or > prim > and doing > <xsl:value-of select="//cust[seq = position()]/name"/> > > > Should return jon for the prim tag and peter fo...

Web resources about - select nodes with child node A and child node B - comp.text.xml

Welsh Affairs Select Committee - Wikipedia, the free encyclopedia
The Welsh Affairs Select Committee (or simply the 'Welsh Affairs Committee') is a select committee of the House of Commons in the Parliament ...

kotaku selects
Kotaku Selects

Here They Come: Facebook Announces Premium Video Ads From ‘Select Group Of Advertisers’
Facebook video ads have finally arrived, at least for a “select group of advertisers,” as the social network announced the launch of what it ...

Adwea selects advisers for 350 megawatt solar park in Abu Dhabi
... solar park in Abu Dhabi announced last year, according to industry insiders. Abu Dhabi Water and Electricity Authority (Adwea) has selected ...

AMD to Bundle New Hitman Game with Select FX CPUs and Radeon 390 Series Video Cards
AMD announced this week that it will bundle the full version of the new Hitman game with its Radeon R9 390-series graphics cards as well as FX ...

Help select the official name for The Sandbox 2, arriving sometime this year
... other players are doing for a dose of inspiration. And along with taking a look at the games progress in the forums, you can even help select ...

HP teams up with iPass to offer global Wi-Fi across select devices, including those running Windows 10 ...
... including both tablets and laptops. The company is extending its partnership with iPass Inc to bring connectivity to what it terms "select devices". ...

Techstars Seattle selects nine startups for accelerator program
The Puget Sound area’s most prominent accelerator, Techstars Seattle, on Tuesday announced its class of 2016, featuring nine early-stage companies ...

Tesla Model 3 Unveiling Event To Have Very Select Guest List
... It seems that the Model X unveiling kerfuffle last year involving CEO Elon Musk and a rather touchy journalist has led to Musk being more selective ...

Select Panel Investigating Planned Parenthood To Issue Subpoenas
Select Panel Investigating Planned Parenthood To Issue Subpoenas

Resources last updated: 3/13/2016 10:26:21 PM