mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			53 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
| <!--
 | |
|   Copyright JS Foundation and other contributors, http://js.foundation
 | |
| 
 | |
|   Licensed under the Apache License, Version 2.0 (the "License");
 | |
|   you may not use this file except in compliance with the License.
 | |
|   You may obtain a copy of the License at
 | |
| 
 | |
|   http://www.apache.org/licenses/LICENSE-2.0
 | |
| 
 | |
|   Unless required by applicable law or agreed to in writing, software
 | |
|   distributed under the License is distributed on an "AS IS" BASIS,
 | |
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
|   See the License for the specific language governing permissions and
 | |
|   limitations under the License.
 | |
| -->
 | |
| 
 | |
| <script type="text/x-red" data-help-name="xml">
 | |
|     <p>Konvertiert zwischen einem XML-String und seiner JavaScript-Objektdarstellung - in beiden Richtungen.</p>
 | |
|     <h3>Eingaben</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">Objekt | String</span></dt>
 | |
|         <dd>Ein JavaScript Objekt oder ein XML String.</dd>
 | |
|     </dl>
 | |
|     <h3>Ausgaben</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">Objekt | String</span></dt>
 | |
|         <dd>
 | |
|             <ul>
 | |
|                 <li>Wenn die Eingabe ein String ist, wird versucht sie als XML zu analysieren und daraus ein JavaScript-Objekt zu erstellen.</li>
 | |
|                 <li>Wenn die Eingabe ein JavaScript-Objekt ist, wird versucht ein XML-String zu erstellen.</li>
 | |
|             </ul>
 | |
|         </dd>
 | |
|         <dt class="optional">Optionen <span class="property-type">Objekt</span></dt>
 | |
|         <dd>This optional property can be used to pass in any of the options supported by the underlying
 | |
|             library used to convert to and from XML. See <a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md#options" target="_blank">the xml2js docs</a>
 | |
|             for more information.</dd>
 | |
|     </dl>
 | |
|     <h3>Details</h3>
 | |
|     <p>Bei der Konvertierung zwischen XML und einem Objekt werden standardmäßig alle XML-Attribute als Eigenschaft namens <code>$</code> hinzugefügt. 
 | |
|         Jeder Textinhalt wird als Eigenschaft namens <code>_</code> hinzugefügt. 
 | |
|         Diese Eigenschaftsnamen können in der Node-Konfiguration angegeben werden.</p>
 | |
|     <p>Zum Beispiel wird das folgende XML wie dargestellt konvertiert:</p>
 | |
|     <pre><p class="tag">Hello World</p></pre>
 | |
|     <pre>{
 | |
|   "p": {
 | |
|     "$": {
 | |
|       "class": "tag"
 | |
|     },
 | |
|     "_": "Hello World"
 | |
|   }
 | |
| }</pre>
 | |
| </script>
 |