Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 08-08-2008
klionsis klionsis is offline
Miembro
 
Registrado: may 2006
Posts: 50
Poder: 18
klionsis Va por buen camino
Manipulación de Archivos XML

Hola gente, no he participado mucho del foro ya que no he necesitado hacer preguntas dado que hasta ahora he podido encontrar todas mis dudas, pero no me paso lo mismo esta vez por lo cual me obliga a hacerles esta pregunta. Estoy necesitando crear, modificar, leer un archivo XML, no he encontrado este tema y la verdad que en delphi 7, que es la versión que utilizo, no sé como realizar esto. La idea es a partir de una consulta a una tabla dbase, generar un archivo XML con una estructura que yo le daria y manipular el mismo para realizar actualizaciones etc. Espero haber sido claro, si alguien me puede ayudar se los agradecere.

Saludos.
Responder Con Cita
  #2  
Antiguo 08-08-2008
Avatar de felipe88
[felipe88] felipe88 is offline
Miembro Premium
 
Registrado: may 2007
Ubicación: Mi Valle del Cauca... Colombia!!!
Posts: 1.120
Poder: 18
felipe88 Va por buen camino
Hola,

Ante todo te advierto que no se nada al respecto, pero encontre esto...

Cita:
Empezado por Ayuda de Delphi
Working with XML documents

XML (Extensible Markup Language) is a markup language for describing structured data. It is similar to HTML, except that the tags describe the structure of information rather than its display characteristics. XML documents provide a simple, text-based way to store information so that it is easily searched or edited. They are often used as a standard, transportable format for data in Web applications, business-to-business communication, and so on.

XML documents provide a hierarchical view of a body of data. Tags in the XML document describe the role or meaning of each data element, as illustrated in the following document, which describes a collection of stock holdings:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE StockHoldings SYSTEM "sth.dtd">
<StockHoldings>
<Stock exchange="NASDAQ">
<name>Borland</name>
<price>15.375</price>
<symbol>BORL</symbol>
<shares>100</shares>
</Stock>
<Stock exchange="NYSE">
<name>Pfizer</name>
<price>42.75</price>
<symbol>PFE</symbol>
<shares type="preferred">25</shares>
</Stock>
</StockHoldings>

This example illustrates a number of typical elements in an XML document. The first line is a processing instruction called an XML declaration. The XML declaration is optional but you should include it, because it supplies useful information about the document. In this example, the XML declaration says that the document conforms to version 1.0 of the XML specification, that it uses UTF-8 character encoding, and that it relies on an external file for its document type declaration (DTD).

The second line, which begins with the <!DOCType> tag, is a document type declaration (DTD). The DTD is how XML defines the structure of the document. It imposes syntax rules on the elements (tags) contained in the document. The DTD in this example references another file (sth.dtd). In this case, the structure is defined in an external file, rather than in the XML document itself. Other types of files that describe the structure of an XML document include Reduced XML Data (XDR) and XML schemas (XSD).

The remaining lines are organized into a hierarchy with a single root node (the <StockHoldings> tag). Each node in this hierarchy contains either a set of child nodes, or a text value. Some of the tags (the <Stock> and <shares> tags) include attributes, which are Name=Value pairs that provide details on how to interpret the tag.

Although it is possible to work directly with the text in an XML document, typically applications use additional tools for parsing and editing the data. W3C defines a set of standard interfaces for representing a parsed XML document called the Document Object Model (XML parsers that implement the DOM interfaces to let you interpret and edit XML documents more easily.

Delphi provides a number of additional tools for working with XML documents. These tools use a DOM parser that is provided by another vendor, and make it even easier to work with XML documents.They include

VCL components and interfaces for working with XML documents.
An XML Data Binding wizard for generating classes to represent a particular XML document.
Tools and components for converting between XML documents and data packets, which let you integrate XML documents into database applications.
...y otras cosas mas, igual creo que en internet se debe encontrar algo al respecto ...
ojala te sirva
__________________
Web
Responder Con Cita
  #3  
Antiguo 08-08-2008
klionsis klionsis is offline
Miembro
 
Registrado: may 2006
Posts: 50
Poder: 18
klionsis Va por buen camino
Muchas gracias, veo que encuentro. Saludos.
Responder Con Cita
  #4  
Antiguo 08-08-2008
Avatar de juanelo
juanelo juanelo is offline
Miembro
 
Registrado: sep 2007
Posts: 1.083
Poder: 18
juanelo Va por buen camino
Puedes manipular el XML con un ClientDataSet, este puede ser tratado como un set de datos "normal". Te aconsejo que le heches una mirada a este tema del ClientDataSet.
Saludos
__________________
Ya tengo Firma!
Responder Con Cita
  #5  
Antiguo 10-08-2008
klionsis klionsis is offline
Miembro
 
Registrado: may 2006
Posts: 50
Poder: 18
klionsis Va por buen camino
Ok, gracias.. Estoy buscando que opciones tengo.

Saludos.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Manipulacion de Ficheros en Pascal armadillo Varios 4 16-02-2007 20:23:38
Manipulaciòn de Archivos kolo toure Varios 1 03-11-2004 23:17:25
Herramienta de manipulacion maravert Gráficos 8 28-07-2004 20:45:54
Manipulacion De Datos En Bd hebert ordonez Firebird e Interbase 3 22-05-2004 10:01:44


La franja horaria es GMT +2. Ahora son las 00:25:36.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi