[Mono-dev] XML - not sure if I've got this right

Paul paul at all-the-johnsons.co.uk
Tue Sep 9 18:40:36 EDT 2008


Hi,

I have a small routine which takes a name and group and then reads an
XML file. The code is this

public string dotheread(string ident, int group)
{
	XmlReaderSettings settings = new XmlReaderSettings(); 
	XmlReader reader = XmlReader.Create(conpath, settings, null);
			
	string retval = "";
			
	Console.WriteLine("version = {0}, ident = {1}", group, ident);
			
	switch (group)
	{
		case 0:
			reader.MoveToAttribute("rawhide");
			break;
		case 1:
			reader.MoveToAttribute("current");
			break;
		case 2:
			reader.MoveToAttribute("previous");
			break;
	}

It then does a read and looks up the element name. For some reason
though, MoveToAttribute does not seem to be working correctly (it's only
sticking on "rawhide").  The Console.WriteLine shows the parameters
being passed in are fine.

The configure.xml file is correctly set up

<?xml version="1.0"?>
<configure>
	<rawhide>
			<Name>rawhide</Name>
			<Branch>devel</Branch>
			<Koji>dist-f10</Koji>
			<KojiAdditional>devel#</KojiAdditional>
	</rawhide>
	<current>
			<Name>Fedora 9</Name>
			<Branch>F-9</Method>
			<Koji>dist-f9-updates-candidate</Koji>
			<KojiAdditional>F-9#HEAD</KojiAdditional>
	</current>
	<previous>
			<Name>Fedora Core 8</Name>
			<Branch>F-8</Method>
			<Koji>dist-f8-updates-candidate</Koji>
			<KojiAdditional>F-8#HEAD</KojiAdditional>
	</previous>
</configure>

I'm at a loss as to what's going on.

Using 2.0 RC 1 on fedora rawhide.

TTFN

Paul
-- 
Sie können mich aufreizen und wirklich heiß machen!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080909/1e431ab0/attachment.bin 


More information about the Mono-devel-list mailing list