XmlNode and read as BinHex

Hi,

I'm processing a document using XmlDocument and I have an XmlNode whose 
value is stored as a binhex encoded string...

How can I get this string converted back to a byte[]...

XmlConvert has some internal methods but is there no public .net framework 
classes or methods that will do this...

Thanks

    Donal


0
macker1 (7)
8/19/2005 11:49:54 AM
dotnet.xml 7266 articles. 0 followers. Follow

6 Replies
597 Views

Similar Articles

[PageSpeed] 12

Hi Donal,

You can use a static method XmlConvert.FromBinHexString to convert the 
BinHex encoded string to byte[]. You can check the following link for more 
information on this method.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemxmlxmlconvertclassfrombinhexstringtopic.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no 
rights."

0
v-kevy (347)
8/20/2005 3:12:02 AM
Not in my version of the .net framework...

Using Framework\V1.1.4322\System.xml.dll

and looking at it in the .net reflector the method is there as a hidden 
method.

Thanks

    Donal




"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message 
news:i3$73TTpFHA.2700@TK2MSFTNGXA01.phx.gbl...
> Hi Donal,
>
> You can use a static method XmlConvert.FromBinHexString to convert the
> BinHex encoded string to byte[]. You can check the following link for more
> information on this method.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
> frlrfsystemxmlxmlconvertclassfrombinhexstringtopic.asp
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
> 


0
macker1 (7)
8/22/2005 10:03:20 AM
meant to say internal method...


0
macker1 (7)
8/22/2005 10:10:22 AM
Donal McWeeney wrote:
> Not in my version of the .net framework...
> 
> Using Framework\V1.1.4322\System.xml.dll
> 
> and looking at it in the .net reflector the method is there as a hidden 
> method.

As a workaround you can get node.OuterXml as a string and then read it 
with XmlTextReader (XmlTextReader r = new XmlTextReader(new 
StringReader(node.Outer.Xml)) and leverage XmlTextReader.ReadBinHex() 
method.

-- 
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
0
some2113 (163)
8/22/2005 3:19:16 PM
Thanks Oleg...


"Oleg Tkachenko [MVP]" <some@body.com> wrote in message 
news:OFqiSSypFHA.3180@TK2MSFTNGP15.phx.gbl...
> Donal McWeeney wrote:
>> Not in my version of the .net framework...
>>
>> Using Framework\V1.1.4322\System.xml.dll
>>
>> and looking at it in the .net reflector the method is there as a hidden 
>> method.
>
> As a workaround you can get node.OuterXml as a string and then read it 
> with XmlTextReader (XmlTextReader r = new XmlTextReader(new 
> StringReader(node.Outer.Xml)) and leverage XmlTextReader.ReadBinHex() 
> method.
>
> -- 
> Oleg Tkachenko [XML MVP, MCAD]
> http://www.xmllab.net
> http://blog.tkachenko.com 


0
macker1 (7)
8/22/2005 4:18:14 PM
Sorry Donal, I didn't notice that. Yes, Oleg's suggestion is good. It will 
work. Thank you, Oleg.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no 
rights."

0
v-kevy (347)
8/23/2005 3:50:34 AM
Reply:

Similar Artilces:

How can client read .pub document without MS Publisher installed??
I just finished a super complicated brochure that I am quite satisfied with. Unfortunately, it is useless because my clients are unable to open it since none of them have MS Publisher installed on their computers. ---- I tried converting it to various formats but it loses too much to be used. ----- Does anyone have any clue how this problem can be solved.....Q-U-I-C-K-L-Y? Thanks in advance! Steve Three letters - PDF -- JoAnn Paules MVP Microsoft [Publisher] "nj-professor" <njprofessor@discussions.microsoft.com> wrote in message news:3EB7D1AF-F318-430F-955B-AF328199...

Did you read about that?
you can take a look for this web sites http://www.theholyquran.org/ http://www.islamway.com/SF/quran/ http://www.geocities.com/islamone_l/index.htm http://www.imanway.com/vb/forumdisplay.php?f=3D90 or read this =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D What is Islam? ABOUT THE WORDS "ISLAM" AND "MUSLIM" The name of this religion is Islam, the root of which is S-L-M, which means peace. The word "Salam," derived from the same root, may also...

Removing Read-Only Access on a file
How do I remove a read-only access on a file in Microsoft Publisher? "Kim" <anonymous@discussions.microsoft.com> wrote in message news:1cb4e01c452e5$d5e883b0$a401280a@phx.gbl... > How do I remove a read-only access on a file in Microsoft > Publisher? Open Windows Explorer, find the file and click once on it, go to file in the upper bar menu and click on it to open the drop down menu, click on properties, remove the check in the read-only radio box, close Windows Explorer. ...

XmlNode
When an XmlNode method returns an XmlNode, such as a child, is this generated on-the-fly or is it the actual component of the internal tree structure? If the parent is moved in the tree, will the pointer remain valid? I have looked at as much of the structure as I can using .NET Reflector and I think it will, but I want to be sure. I 'm planning to add XmlNodes to the Tag property of TreeNodes in a TreeView to be able to persist changes back to the document and I would like to know if this will take up any more memory than when they are not linked in this way, or if it is better to...

how to read XML with entities using C#
Hi there, I have two xml files, one is a master file and the other is just a fragment of xml. Master xml file uses 'DOCTYPE' to define the other file as an entity. Then, the master uses entity references that are supposed to be expanded into real content at parsing time. Examples are provided below. When I open master xml file in InternetExplorer , IE shows correct content. All the entities are transformed into right xml. So far I have been unsuccessfull in getting similar result when I try to do the same programmatically using C#. I was trying to use XmlDocument and XmlVal...

xmlNode.InnerText vs. xmlNode.Value
I've loaded the following xml into an XMLDocument object: <?xml version="1.0" ?> - <Preferences> <Institution>Argh</Institution> <Speaker>Chigier, Ben (1234)</Speaker> <Worktype>Addendum</Worktype> <speakerCode>1234</speakerCode> </Preferences> I then try to retrieve the value of the Institution node as follows: string s = myxmldoc.SelectSingleNode("/Preferences/Institution").Value; However, s is null after the call. But if I change the call to the following, s is what I'd expect: "A...

All Unread Messages are loaded into Inbox As Read
I am using Windoes Mail on Vista-x64. My mail account is with AOL and Windows Mail is configured to use it as an IMAP server. There are no problems sending or receiving e-mails except that all e-mail coming into the Inbox are never in BOLD to indicate they are unread. They are all loaded as if they were read. I can manually set an e-mail to Unread and in that case it will hold the message in BOLD indicating it is unread and it stays that way even if I close and reopen Windows mail. This started happening recently and I'm not sure what triggered it. Any help would be ap...

Mark All as Read does'nt recurse sub folders
Can Outlook be configured? thanks, B No. You need to do the folders separately. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM You can access this newsgroup by visiting http://www.microsoft.com/office/community/en-us/default.mspx or point your newsreader to msnews.microsoft.com. "Brian Stoop" <...

mail read
just loged into my mail account. looks like some of my email was read but i don't remember reading it. how can i tell who last accessed my account? Look for an event 1016 in the event log. This will indicate a mailbox being accessed by another account. Nue "jack" <chasd1@cox.net> wrote in message news:bweGf.248$6G.133@dukeread03... > just loged into my mail account. looks like some of my email was read but > i don't remember reading it. how can i tell who last accessed my account? > On Tue, 7 Feb 2006 22:33:03 -0600, "jack" <chasd1@cox....

reading win 7 event logs
Thanks in advance for your help. I have an app that reads my xp logs and posts them to a central database using WMI. I understand that has changed in win 7. Can anyone out there steer me in the right direction to read the win 7 logs? Thanks. hi Lance, On 06.05.2010 22:29, Lance McGonigal wrote: > I have an app that reads my xp logs and posts them to a central database > using WMI. > I understand that has changed in win 7. Can anyone out there steer me in > the right direction to read the win 7 logs? Not that I know. Neither WMI http://msdn.microsoft....

Outlook Web Access and Read Receipt
I currently use Outlook through the web. Does anyone know how to block read receipts (i.e. you read a message that has read receipt marked, but you don't send the receipt?) I know how to do this in Outlook Express and Outlook, but it appears you can't do it through web access. Thanks! Take a look at Read Receipt Remover application: http://www.ivasoft.biz/rrr.html -- Regards, Victor Ivanidze, software developer www.ivasoft.biz "Kristin" <anonymous@discussions.microsoft.com> wrote: news:09f201c3c967$c7a83550$a301280a@phx.gbl... > I currently use Outlook t...

Cannot Read CDATA (using WINDOWS-1252 encoding)
Hi all, I have an XML document fed to me from a third party app: <?xml version="1.0" encoding="WINDOWS-1252" ?> <GatewayPlan xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Diagnostics> <ErrorCode>0</ErrorCode> <ErrorDescription>OK</ErrorDescription> <Date>11/10/2004</Date> <Time>12:45 PM</Time> </Diagnostics> <GatewayProjectID>5</GatewayProjectID> <CostCenters> <CostCenter>1239280000</C...

reading a .Msg file
Hi, Does anybody know how to open a .Msg file and read the To & Subject fields programmatically in VB? Thanks & Regards, Nishanth use Outlook Redemption form http://www.dimastr.com/redemption/ -- Iv Borissov IMI Support Team http://www.imibo.com/imidev/ *everything that has a beginning has an end* "Nishanth" <cvnishanth@hotmail.com> wrote in message news:uxaRT8NbFHA.1148@tk2msftngp13.phx.gbl... > Hi, > Does anybody know how to open a .Msg file and read the > To & Subject fields programmatically in VB? > > Thanks & Regards, > Nis...

How to get the XML path of an XmlNode?
How can I get the full XML path (as string) of a specific XmlNode ? -- Thanks Sharon Sharon wrote: > How can I get the full XML path (as string) of a specific XmlNode ? What is "the full XML Path" of a node, do you have any definition for that? Some XML editors can assist you constructing or maybe even generating an XPath expression. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ Lets say I have the following XML file: <?xml version="1.0" encoding="utf.8"?> <System Name = "System"> <Parameters> <T1&...

This record is read-only in Microsoft CRM
In our deployment of MS CRM we have a couple of users that receive numerous error messages whenever they open Outlook. The dialog box says, "This record is read-only in Microsoft CRM. Changes will not be synchronized to the Microsoft CRM system." Any thoughts or suggestions would be greatly appreciated. Here is a link to the picture of the error message. http://i242.photobucket.com/albums/ff41/awakin/CRMPopup.jpg r/ A. Akin A record can be read only in CRM if it has been de-activated. What type of record are you trying to edit? On Dec 8, 6:21 pm, "cohenos...@hotmail.com&q...

'There was an error reading the rules from the server. The format of the server
I received this error message after setting up an existing users email account on Windows XP SP1 with Outlook 2002 'There was an error reading the rules from the server. The format of the server rules was not recognised' I can't find any info on this error meassge. ...

Auto Reading Inbox
Today my WLM started automatically opening a message instead of giving me a list of all the messages in my inbox. Just FYI, this is on Vista Home. Any ideas of what happened & how to get it back to showing a list of messages in the inbox? This auto opening is a PITA! TIA, Joe View | Layout. Uncheck the Reading Pane. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "joe" <joe@discussions.microsoft.com> wrote in message news:599D9E2B-8EC0-4C93-AA5D-BAF4D817B0BF@microsoft.com... > Today my WLM started automatically opening...

XmlSerialization to XmlNode
I have a schema that I load into classes that mirror the schema using the XmlSerialization. The schema contains an xsd:Any that I load into 'Extra' as follows: [XmlElement(ElementName="Extra")] public XmlNode Extra { get { return extra;} set { extra = value;}} However, if I have: <Something> <Extra> <a>something</a> <b>another thing</b> </Extra> </Something> I would expect Extra to contain an XmlNode of : <Extra> <a>something</a> <b>another thing</b> <...

Using DIR() to read a directory.
My VB5 reference manual states that directory names "are retrieved in no particular order". On my computer they are always retrieved in ascending order (converting all characters to upper case). Do different versions of Windows return the directory entries otherwise? "NadCixelsyd" <nadcixelsyd@aol.com> wrote in message news:36700d4b-313a-49e6-9d87-cc9c6be9bf64@g19g2000yqe.googlegroups.com... > My VB5 reference manual states that directory names "are > retrieved in no particular order". On my computer they are > always retrieved in a...

Problem with XmlNode.ChildNodes across different machines
I'm having the darndest XML config file problem that I really need help with. I'm supporting a .NET 1.1 desktop application with its own config file, and I implement IConfigurationSectionHandler so I can have a custom config section in my config file. The IConfigurationSectionHandler.Create method just returns the 'section' XmlNode back to the consumer. The config file looks kind of like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="MyConfigSettings" type="MyAssembl...

reading mailbox
Hi, Does anyone know how to detect if anyone changes permissions to be able to read your mailbox? (i.e. give themselves permissions in AD). Thanks, John On Wed, 19 Jan 2005 14:51:03 -0000, "JJ Obgath" <jiuhffhf@ibm.com> wrote: >Hi, > >Does anyone know how to detect if anyone changes permissions to be able to >read your mailbox? (i.e. give themselves permissions in AD). > >Thanks, > >John > Yes, use the standard windows auditing. If you activate the auditing and select the events to audit then you will receive a log entry when permissions ar...

Outlook 2007 Auto Archive
New Outlook user, please go easy on me. As of 01/01/2008 I have converted from Eudora v7.x to Outlook 2007. Running Vista Home Premium, dual core 2.2ghz, 4gb RAM, all patches current per multiple runs of MS Update. I used AddressMagic to import all of my email messages from Eudora into a new OL2007 PST file. Conversion worked great, and I can see and use all of my emails and attachments. FUNCTION: Auto Archiving ERROR: * Pop-up error message declares: "Errors occurred while archiving. Look for a detailed report in your Deleted Items folder." * Delete Items folde...

Outlook seems to pause/freeze once in a while while reading e-mails.
Hello! Sometimes I am navigating around in Outlook 2003 SP2 (all updates) to find and read e-mails at work, and I get freezes/pauses. I believe my HDD is busy and happen when the e-mail has one attachment or more. I keep a lot of e-mails and organize them into separate folders. I don't keep all my e-mails in the Inbox folder like some people do. I am using Windows XP Pro. SP2 (all updates). When I first started using Outlook a few months ago, it was fast and had no pauses/freezes. Nothing odd in Event Viewer logs. I think something degraded. I do empty the trash folder daily, clos...

Security > Disable Read
This is a suggestion, when in Manager and you un-check the feature Security > Disable Read for the price of an item, you still can't read it! You can see the price along when you are in the item menu, and but once you click on it, you can't read it even when Disable Read is un-checked! -- Thank You Vince :) ...

Read Only in Shared workbook
When someone other than myself opens a file that I have shared on a shared network folder it opens as read-only. I have tried everything in the online help pertaining to this but have not found a solution. Please help. You checked the option in tools|share workbook option to allow multiple editing? LAnce >-----Original Message----- >When someone other than myself opens a file that I have >shared on a shared network folder it opens as read-only. >I have tried everything in the online help pertaining to >this but have not found a solution. Please help. >. > Yes &g...