Re: [xml] XML newbie question

On Mon, Aug 07, 2006 at 01:01:25AM -0700, Gopi Rajagopal wrote:
   When I compile this program and run it, the xml generated is as follows:

<?xml version="1.0"?>
<config><host><hname hcmnd1="uname" hostname="solhost" osname="Solaris" 
/><proc hcmnd2="psrinfo" procname="sparcv9"/></host></config>

My question is this:

Why is my opening tag wrong and my closing tag missing?
Why do I see
<hname hcmnd1="uname" hostname="solhost" ... />
instead of
<hname> hcmnd1="uname" hostname="solhost" ...</hname>

  The element is empty, even newbies should spend the minimum time needed to
understand the spec !


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]