rem, to random
@rem@front-end.social avatar

CSS text fragment selector (please)

https://remysharp.com/2024/04/17/css-text-fragment-selector

I wonder actually if @mia might actually be able to weigh in (or slap down…) on this?

tomayac,
@tomayac@toot.cafe avatar

@rem @mia

By the way, this works in Chrome:

const xpath = `//*[text() = 'Ad']`;

const elementsWithSpecificText = document.evaluate(  
 xpath,  
 document,  
 null,  
 XPathResult.ANY_TYPE,  
 null  
);

let result = elementsWithSpecificText.iterateNext();  
while (result) {  
 console.log(result);  
 result.style.border = 'solid red 2px';  
 result.scrollIntoView();  
 result = elementsWithSpecificText.iterateNext();  
}  

Demo: https://outgoing-internal-dance.glitch.me/ (This is straight from Twitter.)

#XPath FTW!

ljrk, to random
@ljrk@todon.eu avatar

Writing complex #XPath expressions to emulate if-then-else using substrings, lists and indexing using boolean conditions... feels like #LambdaCalculus but a lot worse :'D

linuxmagazine, to opensource
@linuxmagazine@fosstodon.org avatar

From this week's Linux Update newsletter: @mfioretti_en looks at Xidel, a data extraction tool for XML, HTML, and JSON documents https://www.linux-magazine.com/Issues/2023/276/Xidel

foxmask, to Ansible French
@foxmask@framapiaf.org avatar

#XPath avec #Ansible ; ca fait TRES mal quand y a des namespaces ....

je t'en foutrai des "syntax error" :P
🤣

foxmask,
@foxmask@framapiaf.org avatar

je tourne autour du pot

comment shooter le contenu du noeud parent quand la value d'un des enfants vaut xxx ...

J'ai la requete #xpath menant à l'enfant mais j'ai besoin de shooter le frere (et le parent) :P
avec #ansible une fois sur l'enfant on peut pas lui dire de supprimer le pere et les gosses ?

hrefna, to random
@hrefna@hachyderm.io avatar

Reading the #JsonLD framing document and just…

It is not weakening my instinct that what they really want is to be working in #XML—with #XPath and #XSLT and #XSD—and not in JSON.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines