Super Contributor.
Super Contributor.

xml deserialize

Eu estou tentando desserializar um XML, mas estou com problema. Consegui alguma coisa mas estou "enxugando gelo: eternamente".

I'm trying to deserialize an XML, but I'm having trouble. I got something but I'm "wiping ice: forever."

set wc to new System.Net.WebClient
set wRetCTE to wc::DownloadData(webAddr)
set reg-sai to type System.Text.Encoding::UTF8::GetString(wRetCTE)

declare DSCTe = new type DataSet
invoke DSCTe::ReadXml(w-nome-sai)
*> aqui quebra o xml em uma DataSet
set wCount to DSCTe::Tables::Count
set wCountRows to DSCTe::Tables[0]::Rows::Count
set wCountCols to DSCTe::Tables[0]::Columns::Count

Aqui esta a parte complicada, como movimentar para variáveis o conteúdo dos campos. Na imagem destaquei toma3 alí existe mais um "nível" como ter acesso a isso.

Here is the tricky part, like moving the contents of the fields to variables. In the image I highlighted toma3 there is another "level" as having access to it.

write wCampos from DSCTe::Tables[0]::Rows[0][0]::ToString


0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.