List Info

Thread: Binary data in ATTRIBUTE




Binary data in ATTRIBUTE
user name
2006-06-30 07:00:33
seems that some thing has messed up my example as it was XML kind blocks.

Please ignore the .... from the folowing

.<.Node. .Attr.=."Binary Data".>.<./.Node.>.

And Not
.<.Node.>.Binary Data.<./.Node.>.


Org Text.......

Hello,

can I get infor about how to put Binary data in Attribute value.

I have come accross many functions in the xmlorg which deals with binary data, but all of them are used to write data in COMMENT / CDATA part not the ATTRIB part.

In other words I want following


And NOT
Binary Data

If any one has any details on this then pls revertback...
I need it badely...

thnaks in advance..
Bipin Mistry.

-----------------------------------------------------------
Hi..! Get this Exclusive Offer From 30gigs.com. Free Ipod Nano! Click Here.
Don't have 30gigs email account yet? Sign up and get your 30GB Webmail account Now!

Binary data in ATTRIBUTE
user name
2006-06-30 09:17:31
Bipin Mistry wrote:
> seems that some thing has messed up my example as it
was XML kind blocks.

"some thing"= a mail client set up to send HTML
mails instead of plain
text, which is something to avoid in the first place.

> can I get infor about how to put Binary data in
Attribute value.
> 
> I have come accross many functions in the xmlorg which
deals with binary
> data, but all of them are used to write data in COMMENT
/ CDATA part not
> the ATTRIB part.

Most typically, you would encode the data using base64 and
put that in
the attribute.  As Daniel says this tends to indicate a very
broken design.

So while

<node attr="binary-data-in-base-64"/>

is possible,

<node>
  <attr
encoding="base64">binary-data-in-base-64</
attr>
 
<other-attr>raw-binary-data-with-entities-as-needed<
;/other-attr>
</node>

is a much better design. Attributes are intended for
_attributes_, not
data (if a class in your program has 'foo' as a member,
then an XML
representation should typically have 'foo' as a
sub-element and not an
attribute).

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )