comp.lang.ada
 help / color / mirror / Atom feed
* XML/Ada 1.0 - SAX - Attribute converted from String to Integer
@ 2005-08-27 17:29 Frank
  2005-08-27 20:58 ` Simon Wright
  2005-08-28 19:32 ` Georg Bauhaus
  0 siblings, 2 replies; 3+ messages in thread
From: Frank @ 2005-08-27 17:29 UTC (permalink / raw)


Hi!

I am programming an interface that reads an XML file, that contains integers 
in Attributes.

E.g

<Data height="21" width="91"></Data>

I am using SAX from XML/Ada 1.0. I wish to retrieve the data from the 
attributes (e.g from height) and put them into
variables of their respective types in Ada (Integers)

Current solution:
I have created:
package XML_Integer_IO is new Ada.Text_IO.Integer_IO(Integer);

I Get_Value the height fromt the element and get Unicode.CES.Byte_Sequence 
as result.
I converted this Unicode.CES.Byte_Sequence to String
Then I use Get from XML_Integer_IO to grab the integer out of the string 
into a Integer variable.

Is this the way it should be done? I would imagine some kind of 
"Get_Value_As_Integer" readymade in the XML library.

Frank





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-28 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-27 17:29 XML/Ada 1.0 - SAX - Attribute converted from String to Integer Frank
2005-08-27 20:58 ` Simon Wright
2005-08-28 19:32 ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox