on master help sign in
Documentation improvements
commit2b585e462928ca2c4f0700634b2d07c71528cf74 authorNeil Mitchell <ndmitchell@gmail.com> dateWed 30 Nov 2016, 19:08 (10 years ago) parentb110954
1 file changed+3−3
src/Text/XML/Hexml.hs+3−3
src/Text/XML/Hexml.hs+3−3
@@ -78,8 +78,8 @@ touchBS = touchForeignPtr . fst3 . BS.toForeignPtr
7878
7979
8080-- | Parse a ByteString as an XML document, returning a 'Left' error message, or a 'Right' document.
81−-- Note that the returned node will have a 'name' of @\"\"@, no attributes, and content as per the document.
82−-- Often the first child will be the @\<?xml ... ?\>@ element. For documents which comprise a single
81+-- Note that the returned node will have a 'name' of @\"\"@, no 'attributes', and 'contents' as per the document.
82+-- Often the first child will be the @\<?xml ... ?\>@ element. For documents which comprise an XML node and a single
8383-- root element, use @'children' n !! 1@.
8484parse :: BS.ByteString -> Either BS.ByteString Node
8585parse src = do
@@ -190,7 +190,7 @@ attributeBy (Node src doc n) str = unsafePerformIO $ withForeignPtr doc $ \d ->
190190 touchBS src
191191 return $ if r == nullPtr then Nothing else Just $ attrPeek src doc r
192192
193−-- | Find the starting location of a node, the '<' character.
193+-- | Find the starting location of a node, the @<@ character.
194194-- The first character will be reported as @(line 1,column 1)@, because thats
195195-- how error messages typically do it.
196196location :: Node -> (Int, Int)