Class ProcessingInstruction
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
ElaborazioneIstruzione
Una rappresentazione di un nodo XML ProcessingInstruction
.
Metodi
Metodo | Tipo restituito | Breve descrizione |
detach() | Content | Scollega il nodo dal nodo Element principale. |
getData() | String | Recupera i dati non elaborati per ogni istruzione nel nodo ProcessingInstruction . |
getParentElement() | Element | Recupera il nodo Element principale del nodo. |
getTarget() | String | Recupera il target per il nodo ProcessingInstruction . |
getValue() | String | Recupera il valore di testo di tutti i nodi che sono figli diretti o indiretti del nodo, nell'ordine in cui appaiono nel documento. |
Documentazione dettagliata
detach()
Scollega il nodo dal nodo Element
principale. Se il nodo non ha un nodo padre, questo metodo non ha alcun effetto.
Invio
Content
: il nodo scollegato
getData()
Recupera i dati non elaborati per ogni istruzione nel nodo ProcessingInstruction
.
Invio
String
: i dati non elaborati per ogni istruzione nel nodo ProcessingInstruction
getParentElement()
Recupera il nodo Element
principale del nodo. Se il nodo non ha un nodo principale, questo metodo
restituisce null
.
Invio
Element
: il nodo Element
principale
getTarget()
Recupera il target per il nodo ProcessingInstruction
.
Invio
String
: il target per il nodo ProcessingInstruction
getValue()
Recupera il valore di testo di tutti i nodi che sono figli diretti o indiretti del nodo, nell'ordine in cui appaiono nel documento.
Invio
String
: il valore di testo di tutti i nodi secondari diretti o indiretti del nodo
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eRepresents an XML \u003ccode\u003eProcessingInstruction\u003c/code\u003e node, providing methods for interaction.\u003c/p\u003e\n"],["\u003cp\u003eOffers methods to detach from parent, retrieve raw data, get parent element, target, and text value.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edetach()\u003c/code\u003e removes the node from its parent, \u003ccode\u003egetData()\u003c/code\u003e retrieves raw instruction data, and \u003ccode\u003egetParentElement()\u003c/code\u003e fetches the parent node.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetTarget()\u003c/code\u003e retrieves the processing instruction's target, and \u003ccode\u003egetValue()\u003c/code\u003e gets the text value of its children.\u003c/p\u003e\n"]]],[],null,["# Class ProcessingInstruction\n\nProcessingInstruction\n\nA representation of an XML `Processing``Instruction` node. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [detach()](#detach()) | [Content](/apps-script/reference/xml-service/content) | Detaches the node from its parent [Element](/apps-script/reference/xml-service/element) node. |\n| [getData()](#getData()) | `String` | Gets the raw data for every instruction in the `Processing``Instruction` node. |\n| [getParentElement()](#getParentElement()) | [Element](/apps-script/reference/xml-service/element) | Gets the node's parent [Element](/apps-script/reference/xml-service/element) node. |\n| [getTarget()](#getTarget()) | `String` | Gets the target for the `Processing``Instruction` node. |\n| [getValue()](#getValue()) | `String` | Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document. |\n\nDetailed documentation\n----------------------\n\n### `detach()`\n\nDetaches the node from its parent [Element](/apps-script/reference/xml-service/element) node. If the node does not have a parent,\nthis method has no effect.\n\n#### Return\n\n\n[Content](/apps-script/reference/xml-service/content) --- the detached node\n\n*** ** * ** ***\n\n### `get``Data()`\n\nGets the raw data for every instruction in the `Processing``Instruction` node.\n\n#### Return\n\n\n`String` --- the raw data for every instruction in the `Processing``Instruction` node\n\n*** ** * ** ***\n\n### `get``Parent``Element()`\n\nGets the node's parent [Element](/apps-script/reference/xml-service/element) node. If the node does not have a parent, this method\nreturns `null`.\n\n#### Return\n\n\n[Element](/apps-script/reference/xml-service/element) --- the parent `Element` node\n\n*** ** * ** ***\n\n### `get``Target()`\n\nGets the target for the `Processing``Instruction` node.\n\n#### Return\n\n\n`String` --- the target for the `Processing``Instruction` node\n\n*** ** * ** ***\n\n### `get``Value()`\n\nGets the text value of all nodes that are direct or indirect children of the node, in the order\nthey appear in the document.\n\n#### Return\n\n\n`String` --- the text value of all nodes that are direct or indirect children of the node"]]