• WBXML 1.3协议摘要


    协议地址:WAP195

    网络字节顺序:big-endian。

    为什么要加0x40?

    参考:Compressing XML

    • When an element contains content (text nodes or child elements) but no attributes, you add a numeric value of 0x40to the byte code
    • When the element contains one or more attributes but no content, add 0x80to the element byte code
    • When the element contains both an attribute and content, add 0xC0 to the element bye code.

    封装数据

    Opaque Data

    opaque = OPAQUE length *byte

    其中,QPAQUE一个字节表示,内容是0xc3. length根据内容的字节长度确定,不包含标示位和长度位。

    长度算法

    length  = data.getBytes().length.

    length into 7bit bytes .Assume bytes.length = N

    bytes[0] += 0x80;

    bytes[1] += 0x80;

    ……

    bytes[n-1] += 0x80;

    ------------------------------------------------------------------------------------------------------------------------------------------ 需要荷兰版牛栏、荷兰美素、母婴用品的攻城师、设计师朋友,欢迎关顾【七彩母婴店】【http://qicaoyun.taobao.com】。凡是从博客园得知信息的,全店商品,均可优惠,请告知客服哦。你也可以通过淘代码【D5867219】,在淘宝搜索到我们。收藏有礼哦!
  • 相关阅读:
    2019/9/8
    实现简单的网页登录注册功能 (使用html和css以及javascript技术) 没有美化的日后补全
    测试一些以前的代码
    使用三层开发遵循的原则
    超市管理
    热身训练
    考试第三题
    考试第七题
    考试第10题
    考试第8题
  • 原文地址:https://www.cnblogs.com/javawer/p/3277585.html
Copyright © 2020-2023  润新知