AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos XML
  • Manipular un documento XML
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Manipular un documento XML
Se pueden utilizar dos métodos para manipular documentos XML:
  1. Utilizar una variable de tipo xmlDocument (Método recomendado). Este método permite utilizar un archivo XSD.
    Existen varios tipos de variables específicas:
    xmlAttributeThe xmlAttribute type is used to handle the attributes of a node in an XML document.
    xmlDocumentThe xmlDocument type is used to handle an XML file.
    xmlNamespaceThe xmlNamespace type is used to handle the XML namespace of a node attribute in an XML document.
    xmlNodeThe xmlNode type is used to handle a node of an XML document.

    Varias funciones específicas permiten utilizar variables de tipo xmlDocument
    XMLBuildStringRetrieves and formats the content of an XML document (created by XMLDocument and modified by the XML functions).
    XMLOpenLoads an XML document from a file, a URL or a string into an xmlDocument variable.
    XMLSaveSaves an XML document in a file.
    XMLValidDocumentValidates an XML document from an XSD schema.
  2. Utilizar una variable de tipo String para almacenar el documento XML. El documento XML puede manipularse utilizando diferentes funciones XML.
    Las siguientes funciones permiten gestionar documentos XML:
    JSONToXMLConvierte una cadena JSON en XML.
    TextToXMLConvierte una cadena ANSI en una cadena XML.
    XMLAddAttributeAdds an attribute into an XML document.
    XMLAddChildAdds a child tag into an XML document.
    XMLBuildStringRetrieves and formats the content of an XML document (created by XMLDocument and modified by the XML functions).
    XMLCancelSearchCancela la búsqueda realizada por XMLFind.
    XMLChildPositions on the first child element of current element.
    XMLChildExistEspecifica si la etiqueta actual tiene hijos correspondientes al tipo buscado (etiqueta, atributo, ...).
    XMLCloseCierra un documento XML creado por XMLDocument.
    XMLDataReturns the value of current element (tag or XML attribute) or the value of one of its attributes.
    XMLDeleteElimina el elemento actual (así como toda la rama) de un documento XML.
    XMLDocumentCreates a new XML document.
    XMLElementNameReturns the name of current element (tag or attribute).
    XMLElementTypeReturns the type of current element (tag or attribute).
    XMLExecuteXPathExecutes an XPATH query:
    • in an XML document.
    • in an xmlDocument variable.
    XMLExtractDocumentCreates a new XML document from an existing XML document.
    XMLExtractStringExtrae el contenido de una etiqueta que se encuentra en un documento XML.
    XMLFindPerforms a search in an XML document.
    XMLFindNamespaceByNameFinds an XML namespace according to its XML node and in the parents of the node.
    XMLFindNamespaceByURIFinds an XML namespace from its URI (Universal Resource Identifier) in a node and in the parents of this node.
    XMLFirstPosiciones en el primer elemento (etiqueta o atributo) en el nivel de árbol actual.
    XMLFoundChecks whether the current element corresponds to the current browse or to the current search.
    XMLInsertDocumentInserta la etiqueta XML actual que se encuentra en un documento XML en otro documento XML.
    XMLInsertElementInserta un elemento XML (etiqueta o atributo) en un documento XML.
    XMLLastPosiciones en el último elemento (etiqueta o atributo) del nivel actual del árbol.
    XMLModifyModifica el contenido del elemento actual que se encuentra en el documento XML.
    XMLNamespaceReturns the prefix of the namespace associated with the current tag in an XML document.
    XMLNamespaceURIReturns the URI of the namespace associated with the current tag in an XML document.
    XMLNextPositionq on the next element (tag or attribute).
    XMLOpenLoads an XML document from a file, a URL or a string into an xmlDocument variable.
    XMLOpenReaderCreates a reader used to read an XML document without loading it in memory.
    XMLOutUsed to find out whether the element (tag or attribute) on which we want to be positioned is outside the XML document.
    XMLParentPosiciones en el elemento padre del elemento actual (etiqueta o atributo).
    XMLParentNameReturns the name of parent tag for the current element (tag or attribute).
    XMLPathReturns the current position in the document in XPATH format.
    XMLPreviousPositions on the previous element (tag or attribute).
    XMLReadReturns the value of an XML element or the value of the attribute for an XML element.
    XMLRenameCambia el nombre del elemento actual (etiqueta o atributo) en un documento XML.
    XMLRestorePositionRestaura el contexto previamente guardado de un documento XML.
    XMLResultReturns the result of a calculation XPath query.
    XMLRootPosiciones en la etiqueta raíz de un documento XML.
    XMLSaveSaves an XML document in a file.
    XMLSavePositionStores the current position in the XML document.
    XMLSignFirma un documento XML.
    XMLToJSONConvierte una cadena XML en JSON.
    XMLToTextConverts a character string in XML format into a standard character string.
    XMLValidDocumentValidates an XML document from an XSD schema.
    XMLValidNodeValidates an XML node, its children and its attributes from its description in the XSD schema linked to the XML document.
    XMLVerifySignatureVerifica la firma de un nodo XML.
    XMLWriteCrea o modifica el valor de un elemento XML o el valor del atributo de un elemento XML.
También puede utilizar otras funciones para manipular documentos XML:
HExportXMLExports the records found in a data file (HFSQL or OLE DB), view or query to an XML file.
HImportXMLImports an XML file into an HFSQL Classic or Client/Server data file. This data file must have been defined in the data model editor, or declared with HDeclare, HDeclareExternal or HDescribeFile).
HRecordToXMLRetrieves the structure and the value of the current record and exports them into a character string in XML format.
J2EERunXMLEjecuta un procedimiento en un servidor de servicios web J2EE XML.
LooperToXMLCreates an XML file with data from a Looper control (Looper control based on a data file or populated programmatically).
SOAPRunXMLRuns a procedure on a SOAP server.
TableToXMLCreates an XML file from the data found in a Table or TreeView Table control.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/04/2025

Señalar un error o enviar una sugerencia | Ayuda local