simple xml question

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

    #1

    simple xml question

    I have one xml document that includes a second xml document within a pair of
    tags. The second document also has the xml declaration <xml version="1.0"
    ?>. Is this OK, or do I need to remove the declaration from the second xml
    document?


  • Micah Cowan

    #2
    Re: simple xml question

    "Dan Henderson" <dan_henderson@ bellsouth.net> writes:
    [color=blue]
    > I have one xml document that includes a second xml document within a pair of
    > tags. The second document also has the xml declaration <xml version="1.0"
    > ?>. Is this OK, or do I need to remove the declaration from the second xml
    > document?[/color]

    The above is not an xml declaration; nor is it a valid tag. If
    you meant, <?xml version="1.0"?> , then the answer to your
    question is: it is not OK, you need to remove the declaration
    from the "second xml document", otherwise you do not have
    well-formed XML.

    -Micah

    Comment

    • Andy Fish

      #3
      Re: simple xml question

      you could store the whole child document in a CDATA section but then you
      would not really be storing it as XML, just a blob which happened to be XML

      "Micah Cowan" <micah@cowan.na me> wrote in message
      news:m3ekxqztye .fsf@localhost. localdomain...[color=blue]
      > "Dan Henderson" <dan_henderson@ bellsouth.net> writes:
      >[color=green]
      > > I have one xml document that includes a second xml document within a[/color][/color]
      pair of[color=blue][color=green]
      > > tags. The second document also has the xml declaration <xml[/color][/color]
      version="1.0"[color=blue][color=green]
      > > ?>. Is this OK, or do I need to remove the declaration from the second[/color][/color]
      xml[color=blue][color=green]
      > > document?[/color]
      >
      > The above is not an xml declaration; nor is it a valid tag. If
      > you meant, <?xml version="1.0"?> , then the answer to your
      > question is: it is not OK, you need to remove the declaration
      > from the "second xml document", otherwise you do not have
      > well-formed XML.
      >
      > -Micah[/color]


      Comment

      Working...