Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Registered User
    Join Date
    Aug 2009

    Re: Parsing wbxml file to xml file using kxml parser

    I have found the problem for #7 post, see in red.
    Quote Originally Posted by ramyashashe View Post
    using the following code i created the wbxml file

    public byte[] getWBXMLStream(byte[] xmlData) { // xml to wbxml
    try {
    // Construct an InputStreamReader on ByterArrayInputStream.
    InputStreamReader in = new InputStreamReader(new ByteArrayInputStream(xmlData));

    // Make parser using this Reader.
    XmlParser parser = new XmlParser(in);

    // Construct a DOM Document to parse XML.
    Document document = new Document ();

    // Make an OutputStream on which WbxmlWriter can write.
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    AbstractXmlWriter writer = new WbxmlWriter(out);

    // Get WBXML from this stream.
    xmlData = out.toString().getBytes(); //<----- This is the problem! Try out.toByteArray(); If you convert it to a String first it will mess up your bytes and the length of the String Table in the WBXML document will be wrong

    catch (Exception e) { e.printStackTrace(); }
    return xmlData;

    after converting using this i try to parse the wbxml file.

  2. #17
    Registered User
    Join Date
    Mar 2003


    Thanks for updating. How could I miss that?

  3. #18
    Registered User
    Join Date
    May 2010

    Re: Parsing wbxml file to xml file using kxml parser

    I can not use <input type='file'> or open the image in Nokia Mobile Browser! It show the problem that : WBXML Parser: invalid content. Can anyone solve it for me please?

  4. #19
    Registered User
    Join Date
    Mar 2003
    socheata, could you elaborate a bit more about your problem? Are you dealing with SVG?

Similar Threads

  1. XML Parser in C++
    By mrinal_malhotra in forum Symbian
    Replies: 4
    Last Post: 2008-11-10, 13:22
  2. Replies: 1
    Last Post: 2005-05-26, 14:22
  3. XML parsing problem in Nokia 12
    By codekiller in forum Nokia M2M
    Replies: 2
    Last Post: 2005-04-26, 09:01
  4. Replies: 0
    Last Post: 2002-06-10, 12:24
  5. XML parsing
    By Nokia_Archive in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-05-31, 19:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts