Basic Question on Creating XML documents

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vvenk

    #1

    Basic Question on Creating XML documents

    Hello:

    I am learning XML technology. I have a question on creating an XML document
    that conforms to a DTD/XSD.

    While there is a function that I can call to make sure that the XML document
    is valid, I would like to know how I can create it.

    Do I have to understand the DTD/XSD and code my module so that the XML
    document is valid? Or, are there tools available to do this? What if the data
    is in SQL Server but I have to create an XML rendition of the data that
    conforms to a DTD/XSD?

    Thanks.

    venki

  • Peter Flynn

    #2
    Re: Basic Question on Creating XML documents

    vvenk wrote:
    [color=blue]
    > Hello:
    >
    > I am learning XML technology. I have a question on creating an XML
    > document that conforms to a DTD/XSD.
    >
    > While there is a function that I can call to make sure that the XML
    > document is valid, I would like to know how I can create it.
    >
    > Do I have to understand the DTD/XSD and code my module so that the XML
    > document is valid?[/color]

    Yes.
    [color=blue]
    > Or, are there tools available to do this?[/color]

    Yes, any good XML editor can read a DTD or Schema and let you create
    a valid initial document by hand to get started with. That will help
    you understand the data structure, so then coding will be much easier.
    [color=blue]
    > What if the
    > data is in SQL Server but I have to create an XML rendition of the data
    > that conforms to a DTD/XSD?[/color]

    You need to understand the data structure of the database *and* the target
    DTD/XSD first, then you will see more clearly what mapping you need.
    Beware: there is rarely a perfect 1:1 mapping :-)

    ///Peter
    --
    XML FAQ: http://xml.silmaril.ie/

    Comment

    Working...