Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML Attachment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Divers
Thread ID:
00825471
Message ID:
00825991
Vues:
23
Thank you very much Rick... The missing piece was the
Select Single Node statement with the correct parameter.
I went right for the Content, and this is what caused the
writing of the file to not contain all the information
it needed to work. When I switched it to your information
it worked great...

Thanks again...
Bob


>Hi Bob,
>
>Try this code:
>
>
>LOCAL o as MSXML2.DomDocument
>o = CREATEOBJECT("MSXML2.DOMDOCUMENT")
>o.async = .f.
>? o.load("http://www.zephran.com/bobtest.xml")
>? o.parseError.reason
>
>LOCAL loNode as MSXML2.IXMLDOMNode
>loNode = o.documentElement.selectSingleNode("CTFSAttachments/Document/Content")
>lcPDF = loNode.nodeTypedValue
>STRTOFILE(lcPDF,"d:\temp\test.pdf")
>
>*** View the PDF
>DO WCONNECT
>GoUrl("d:\temp\test.pdf")
>
>RETURN
>
>
>Hope this helps,
>
>
>>Hi Rick,
>>
>>I didnt want to post a 19K File on the UT, so I put it up on my
>>web server at http://www.zephran.com/bobtest.xml. I dont know
>>if this is the preferred method for large posts or not...
>>So I apologize if I should have just cut and pasted it here...
>>
>>It is a PDF File that is Embedded into the Return XML Set...
>>I just want to pull the PDF information out of the XML and
>>display it (Or save it to Disk and then display it..)
>>
>>Thanks!
>>Bob
>>
>>
>>>You might want to show the entire document as what you posted could be interpreted in a number of ways. It depends on the type of the node, but if there's a schema (or the node has some sort of schema definition) you can use the nodeTypedValue function of the DOM node to retrieve base64 content in its decoded form.
>>>
>>>+++ Rick ---
>>>
>>>
>>>>Hi All,
>>>>
>>>>I have an XML File, that contains a base64 Encoded PDF File
>>>>in the following section:
>>>>
>>>>-
>>>>-
>>>>PDF File
>>>>FileName.PDF
>>>>PDF
>>>>base64
>>>>
>>>>Can someone tell me how to get this out of the XML and onto
>>>>a Disk File??
>>>>
>>>>Thank you in advance,
>>>>Bob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform