Search Results

Search found 5157 results on 207 pages for 'node'.

Page 41/207 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • finding an adjacent node in xml through xpath

    - by kolosy
    i have a deeply nested structure (actually parsing out xhtml, so lots of nasty), like so: <tr> <td> <font id="blah"> stuff </font> </td> </tr> <tr> <td> more stuff </td> </tr> and this repeats in a long table. i need an xpath expression that will select the second font tag (or rather it's text()). i was looking at the preceding-sibling axis, but something isn't quite working right. something along the lines of (and pardon me if this is ridiculous, my xpath is rusty) //tr[preceding-sibling::tr/td/font/b]/td/text()

    Read the article

  • AJAX XML reply node value iteration

    - by XpiritO
    Hi there, guys. I would really appreciate to get your help on this, as I can't seem to detect and solve the problem I'm having with an AJAX functionality on a site that I'm currently developing. I have a webform that makes an asynchronous call to a handler (.ashx) that delivers a XML response that is later processed by a Javascript client-side function that places it's contents into the user-interface. I'm attaching an example of the response generated by my handler, and what I would like to know is how can I get all the <body> element innerHTML (with the text and child nodes) contents to append it to a <span> element on the user-interface. Can anyone help me out with this? XML Response returned by the handler (checked via Firebug): <message> <content> <messageId>2</messageId> <from>Barack Obama</from> <fromMail>[email protected]</fromMail> <subject>Yes, we can... get World Peace</subject> <body>Hello, dear citizen. I'm sending you this message to invite you to join us! <a href="http://www.whitehouse.gov">Test link</a> Thank you for your time.</body> </content> </message> Client-side Javascript function to affect the user-interface innerHTML property with the data returned via AJAX: function GetMessageContentsCallback(args, resp) { //XML Parser try { //Internet Explorer xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.loadXML(resp); } catch (e) { parser = new DOMParser(); xmlDoc = parser.parseFromString(resp, "text/xml"); } var msgReply = xmlDoc.getElementsByTagName('message')[0]; var ajaxRespondeBodyInnerHTML = msgReply.getElementsByTagName(body)[0].firstChild.nodeValue; //this currently only delivers inner text content, without the <a href... bit and subsequent text document.getElementById("bodySpan").innerHTML = ajaxRespondeBodyInnerHTML; }

    Read the article

  • doesn't parse xml when it's a single node

    - by tag
    my script.php returns this XML <all> <item> <field1>value1</field1> <field2>value2</field2> </item> <item> <field1>value1</field1> <field2>value2</field2> </item> </all> The HTTPService uses the default resultFormat="object" but I don't declare it since it's the default. Then I bind it to a List dataProvider="{getDataHTTP.lastResult.all.item}" I get no problems when the number of item returned is more than 1. But when it's only 1 item I get an error cannot convert XMLList to mx.collections.IList. I tried different solutions including trying to cast it as XMLListCollection but it still gives an error for single items. Does anyone know of a way to possibly solve this?

    Read the article

  • Getting the correct node

    - by YsoL8
    Hello I have this structure in my dom: <label>London<input type="checkbox" name="London"></label><br> <div class="innerpost"> <label>N1 2AB<input type="checkbox" name="N1 2AB"></label><br> <label>E1 1AB<input type="checkbox" name="E1 1AB"></label><br> </div> I need a way to select the div from the first checkbox. Something like parentNode.parentNode.getElementsByTagName("div"); But I'm not getting it right - that particular line selects all the divs one parent above the one I need.

    Read the article

  • How to find specific value of the node in xml file

    - by user2735149
    I am making windows phone 8 app based the webservices. This is my xml code: - <response> <timestamp>2013-10-31T08:30:56Z</timestamp> <resultsOffset>0</resultsOffset> <status>success</status> <resultsLimit>8</resultsLimit> <resultsCount>38</resultsCount> - <headlines> - <headlinesItem> <headline>City edge past Toon</headline> <keywords /> <lastModified>2013-10-30T23:45:22Z</lastModified> <audio /> <premium>false</premium> + <links> - <api> - <news> <href>http://api.espn.com/v1/sports/news/1600444?region=GB</href> </news> </api> - <web> <href>http://espnfc.com/uk/en/report/381799/city-edge-toon?ex_cid=espnapi_public</href> </web> - <mobile> <href>http://m.espn.go.com/soccer/gamecast?gameId=381799&lang=EN&ex_cid=espnapi_public</href> </mobile> </links> <type>snReport</type> <related /> <id>1600444</id> <story>Alvardo Negredo and Edin Dzeko struck in extra-time to book Manchester City's place in the last eight of the Capital One Cup, while Costel Pantilimon kept a clean sheet in the 2-0 win to keep the pressure on Joe Hart. </story> <linkText>Newcastle 0-2 Man City</linkText> - <images> - <imagesItem> <height>360</height> <alt>Man City celebrate after Edin Dzeko scored their second extra-time goal at Newcastle.</alt> <width>640</width> <name>Man City celeb Edin Dzeko goal v nufc 20131030 [640x360]</name> <caption>Man City celebrate after Edin Dzeko scored their second extra-time goal at Newcastle.</caption> <type>inline</type> <url>http://espnfc.com/design05/images/2013/1030/mancitycelebedindzekogoalvnufc20131030_640x360.jpg</url> </imagesItem> </images> Code behind: myData = XDocument.Parse(e.Result, LoadOptions.None); var data = myData.Descendants("headlines").FirstOrDefault(); var data1 = from query in myData.Descendants("headlinesItem") select new UpdataNews { News = (string)query.Element("headline").Value, Desc = (string)query.Element("description"), Newsurl = (string)query.Element("links").Element("mobile").Element("href"), Imageurl=(string)query.Element("images").Element("imagesItem").Element("url").Value, }; lstShow.ItemsSource = data1; I am trying to get value from xml tags and assign them to News,Desc, etc. Everything works fine except Imageurl, it shows NullException. I tried same method for Imageurl, i dont know whats going wrong. Help..

    Read the article

  • delete XML node, keep original

    - by marzsman
    I need to delete some nodes from an XML variable and I want to keep the original intact. So I pass the XML to a new variable and delete the nodes from that one but the original changes with it. Is there a way to protect the XML from the original variable?

    Read the article

  • change a value xml in php but false with a node name id-7

    - by Nataly Nguyen
    I want to change a xml, but fails with this code. I think mistake with name of variable (ID-1) in php. chang.php <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); $xml->ID-1 = '8'; $xml->name = 'Big Cliff'; $xml->asXML('test2.xml'); echo $xml->asXML(); ?> example.php <?php $xmlstr = <<<XML <?xml version="1.0" encoding="utf-8"?> <film> <ID-1>29</ID-1> <name>adf</name> </film> XML; ?>

    Read the article

  • Verify p2p node

    - by mazzzzz
    Hey guys, I have been working on a p2p namespace for some of my programs. I created a system to encrypt/decrypt the packets send/received with the class. I was using the basic public private key system: 1) encrypt the data with Symmetric encryption 2) encrypt the symmetric key with RSA. Then do the opposite when you decrypted.. I was wondering though, how would you verify if the packet was coming from where it said it was. I was going to use a basic certificate system (where you encrypt with your private RSA key, then they decrypt it with your public key), but I don't know how to do this with C#. I am using the RSACryptoServiceProvider class. Does anyone know how do this? Thanks, Max

    Read the article

  • xpath - limit search to node not working?

    - by Mr W
    What am I doing wrong here? I am trying to limit my xpath search to a specific row in my table but my query always returns the content of the span in the first row: var query = "//span[contains(@id, 'timer')]"; var root = document.getElementById('movements').rows[1]; document.evaluate(query, root, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.textContent Please help!

    Read the article

  • How to display node name in Action script 3 xml

    - by Mirage
    My xml is like below <rat> <to>tt</to> <from>ggg</from> <heading>hhhhh</heading> <body>jjj</body> </rat> My AS3 code is var example:XML = new XML(event.target.data); _label.text = example[0].rat[0][nodeName]; addChild(_label); I want to display the data like to = tt from = ggg how can i do that

    Read the article

  • XSLT - Comparing preceding-sibling's elements with current's node element

    - by siondream
    Hello, I have this XML file: <recursos> <recurso url="http://w3c.com"> <descripcion>Consorcio W3C</descripcion> <tipo>externo</tipo> <idioma>ingles</idioma> <contenido>General</contenido> <unidad>Unidad 2</unidad> </recurso> <recurso url="http://html.com"> <descripcion>Especificación HTML</descripcion> <tipo>externo</tipo> <idioma>castellano</idioma> <contenido>HTML</contenido> <version>4.01</version> <unidad>Unidad 3</unidad> </recurso> </recursos> I want to compare one "recurso"'s preceding sibling element "unidad" with the "unidad" of the current "recurso" to check if they're different. I was trying: <xsl:if test="preceding-sibling::recurso[position()=1]::unidad != unidad"> </xsl:if> But I know it's horribly wrong :( I hope you could help me, thank you very much.

    Read the article

  • Select records from XML column (SQL Server 2005) based on node order

    - by jdoe
    I have a column in a SQL Server 2005 table defined as an XML column. Is there a way to select records from this table based on the order of two nodes in that column? For example, we have the following structure in our XML: <item> <latitude/> <longitude/> </item> I want to see if there are any records that have latitude/longitude in the opposite order i.e. <longitude/> then <latitude/>. I've tried some XPath expressions but with no luck.

    Read the article

  • Split node list to parts.

    - by Kalinin
    xml: <mode>1</mode> <mode>2</mode> <mode>3</mode> <mode>4</mode> <mode>5</mode> <mode>6</mode> <mode>7</mode> <mode>8</mode> <mode>9</mode> <mode>10</mode> <mode>11</mode> <mode>12</mode> i need to separate it on parts (for ex. on 4): xslt: <xsl:variable name="vNodes" select="mode"/> <xsl:variable name="vNumParts" select="4"/> <xsl:variable name="vNumCols" select="ceiling(count($vNodes) div $vNumParts)"/> <xsl:for-each select="$vNodes[position() mod $vNumCols = 1]"> <xsl:variable name="vCurPos" select="(position()-1)*$vNumCols +1"/> <ul> <xsl:for-each select="$vNodes[position() >= $vCurPos and not(position() > $vCurPos + $vNumCols -1)]"> <li><xsl:value-of select="."/></li> </xsl:for-each> </ul> </xsl:for-each> this code is written by Dimitre Novatchev - great coder)) but for the number of nodes less then number of parts (for ex. i have 2 modes) this code does not work - it outputs nothing. How it upgrade for that case (without choose construction)?

    Read the article

  • Updating the url of a navigation node in moss programatically

    - by 78lro
    Can anyone see why this should not work: SPSite topNavigationSite = new SPSite("http://moss"); SPWeb topNavigationWeb = topNavigationSite.OpenWeb(); SPNavigationNodeCollection topNavigationBarNodes = topNavigationWeb.Navigation.TopNavigationBar; SPNavigationNode updateNode = topNavigationBarNodes.Navigation.GetNodeByUrl("/about"); updateNode.Url = ""; topNavigationWeb.Update(); I can see debugging that the url get's set to "" but when the page renders, the navigation still shows the url as /about/default.aspx I'm running this in page_load and expected it to update the moss database with the new url value.

    Read the article

  • Write an xml file from the specified node?

    - by Googler
    Hi all, This is my xml file Input: <world> <patent> <xml>a</xml> <java>333</java> <jaxb>111</jaxb> </patent> </world> I need the read the above xml file and reproduce the following the output Output: <patent> <xml>a</xml> <java>333</java> <jaxb>111</jaxb> </patent> I dont need the world element. How to achieve this using Xpath. Can anyone help me on this?

    Read the article

  • ExtJS: Add Single Click Action To A Node In A TreePanel

    - by FluidFoundation
    [revised] I'm creating a TreePanel in ExtJs that is loading its children from a JSON file. I'm having trouble adding a click action to the nodes. I'm not sure whether it's added in the script creating the tree, or if its added as a property in the JSON, and if so, what the syntax would be. Any help would be appreciated! Please provide an example if possible.

    Read the article

  • Sharepoint Designer XSLT count boolean node = true

    - by Heather Masters
    I have a SharePoint list I converted to XSLT to do some additional grouping and counting and percentages. I need to return the number of items = true within my nodeset, I have: <xsl:value-of select="count($nodeset/@PartnerArrivedAtCall)"/> (which returns the count of all the nodes) I have tried <xsl:value-of select="count($nodeset/@PartnerArrivedAtCall [@PartnerArrivedAtCall = 'Yes'])"/> (returns zero) and <xsl:variable name="ArrivedYes" select="$nodeset/@PartnerArrivedAtCall [@PartnerArrivedAtCall='Yes']"/> (also returns zero) Can you please give me a good example of how to count only the true values (in my XML, true = "Yes") Thanks!

    Read the article

  • Neo4j+Gremlin : Trouble with T.gte and floating point node attributes

    - by letronje
    For a type of nodes in my graph, attribute values for an attribute(named 'some_count') is either missing or an integer or a float. I'm trying to write gremlin to filter these nodes based on minimum value for this attribute. I first verified that the values are indeed present by firing the following gremlin g.v(XXX)._().in('category').hasNot('some_count', T.eq, null).back(1).some_count Next, I tried filtering by exact value and that works and show me the matching nodes or gives an empty array if there is no match g.v(XXX)._().in('category').hasNot('some_count', T.eq, null).back(1).has('some_count', T.eq, 120000.0d) But the following query that uses the 'greater than or equal to' comparator doesn't work. g.v(XXX)._().in('category').hasNot('some_count', T.eq, null).back(1).has('some_count', T.gte, 1.0d) this returns nil (I'm querying via ruby/rails using Neo4j AR Adapter ) Instead of returning an empty array for no match, it returns a nil, which tells me something could be wrong with the query itself. I'm running neo4j community server 1.8. Is there a way I can ask Neo4j to log errors/queries, to see what could be going wrong ?

    Read the article

  • How To Configure Fields To Display In Ubercart Product Node

    - by mrtrombone
    Hi I have set up ubercart on a site and everything seems ok when adding products and viewing the catalog page however when I click on the product the product view does not include the product image or the price. I have have enabled all fields in admin/store/settings/products/edit/fields however this does not seem to change anything (SKU etc not displayed either, only description, size options, add to cart button and link to category) Can anyone suggest why these may not be showing, Am I looking at completely the wrong config screen? Thanks

    Read the article

  • drupal adding onchange event to node form

    - by Arun
    hi i need to know how to add attribute onchange to a custom content_type field? For ex my content_type has 2 fields phone (name:field_phone[0][value], id:edit-field-phone-0-value),email (name:field_email[0][value], id:edit-field-email-0-value). i'm unable to add attribute as follows. function knpevents_form_event_node_form_alter(&$form, &$form_state) { $form['title']['#attributes'] = array('onchange' => "return titlevalidate(0)");//fine $form['field_evt_org[0][value]']['#attributes']= array('onchange' => "return organiservalidate(0)"); //error $form['field_evt_org[0][value]']['#attributes']= array('onchange' => "return organiservalidate(0)"); //error } how to add it

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >