File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ function parsexml(xmlstring::AbstractString)
7474 (:xmlParseMemory , libxml2),
7575 Ptr{_Node},
7676 (Cstring, Cint),
77- xmlstring, length (xmlstring))
77+ xmlstring, sizeof (xmlstring))
7878 if ptr == C_NULL
7979 throw_xml_error ()
8080 end
Original file line number Diff line number Diff line change 8787 @test nodetype (parsexml (" <xml/>" . data). node) === EzXML. XML_DOCUMENT_NODE
8888 @test nodetype (parsexml (" <html/>" . data). node) === EzXML. XML_DOCUMENT_NODE
8989
90+ # This includes multi-byte characters.
91+ doc = parse (Document, """
92+ <?xml version="1.0" encoding="UTF-8" ?>
93+ <Link>
94+ <Name>pubmed_pubmed</Name>
95+ <Menu>Similar articles</Menu>
96+ <Description>... “linked from” ...</Description>
97+ <DbTo>pubmed</DbTo>
98+ </Link>
99+ """ )
100+ @test nodetype (doc. node) === EzXML. XML_DOCUMENT_NODE
101+
90102 @test_throws ArgumentError parse (Document, " " )
91103 @test_throws XMLError parse (Document, " " )
92104 @test_throws XMLError parse (Document, " abracadabra" )
You can’t perform that action at this time.
0 commit comments