vb.net - XML 1.1 number version is not valid with xml document -
i have xml document this
<?xml version="1.1" encoding="utf-8" standalone="yes"?> <p:fatturaelettronica versione="1.1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:p="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <fatturaelettronicaheader> <datitrasmissione> <idtrasmittente> <idpaese>it</idpaese> ...
if use:
dim doc new xmldocument() doc.load(filepath)
i receive error:
1.1 not valid version
why, how can read xml version?
thanks
give try. assumes not having first line has no consequences.
dim filelines list(of string) = io.file.readalllines(filepath).tolist filelines.removeat(0) dim fileasstring string = string.join(environment.newline, filelines) dim xe xelement = xelement.parse(fileasstring) dim doc new xmldocument() doc.load(xe.createreader)
Comments
Post a Comment