on master help sign in
Add selectors to Attribute
commitb4b0036c6de8c75e10341bb09a3ceb71d1f4a347 authorNeil Mitchell <ndmitchell@gmail.com> dateWed 30 Nov 2016, 19:08 (10 years ago) parentcd4c10b
1 file changed+4−1
src/Text/XML/Hexml.hs+4−1
src/Text/XML/Hexml.hs+4−1
@@ -64,7 +64,10 @@ data Node = Node BS.ByteString (ForeignPtr CDocument) (Ptr CNode)
6464
6565-- | An XML attribute, comprising of a name and a value. As an example,
6666-- @hello=\"world\"@ would produce @Attribute \"hello\" \"world\"@.
67−data Attribute = Attribute BS.ByteString BS.ByteString deriving (Show, Eq, Ord)
67+data Attribute = Attribute
68+ {attributeName :: BS.ByteString
69+ ,attributeVaule :: BS.ByteString
70+ } deriving (Show, Eq, Ord)
6871
6972instance Show Node where
7073 show d = "Node " ++ show (BS.unpack $ outer d)