Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    82

    Parsing XML: how to retrieve 'inner HTML' ?

    I'm parsing the api dump in xml of jquery doc (api.jquery.com/api).

    parameter description and long description of call contains often 'code' tag, and similar html tag.

    So, my idea was to retrieve with xpath->evaluate the content of the dom node, but using nodeValue the html will be loosen. Only text note will be retrieved.

    is there a way to ready the entrire content of a tag without altering its content ?

    follow an example

    codice:
    <desc>A map of additional options to pass to the method. Supported keys:
            <ul>[*]<code>duration</code>: A string or number determining how long the animation will run.[*]<code>easing</code>: A string indicating which easing function to use for the transition.[*]<code>complete</code>: A function to call once the animation is complete.[*]<code>step</code>: A function to be called after each step of the animation.[*]<code>queue</code>: A Boolean indicating whether to place the animation in the effects queue. If <code>false</code>, the animation will begin immediately.[*]<code>specialEasing</code>: A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions (added 1.4).[/list]
            </desc>
    I want to save into a string the full inalterated content of 'desc' tag. Included <ul>,[*], etc.. tags...

    How to ?

  2. #2
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    82
    Perdonatemi se ho scritto in inglese, è l'abitudine ....

    volevo sapere se c'è un modo per ottenere il contenuto di un nodo, compresi tutti i suoi figli eventuali, ma con i tag e tutto, tipo un innerHTML per intenderci...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.