XMl Data into String in blackberry - blackberry

Read the contents of an local XML file in an application and get the whole contents of xml file into a string for blackberry application?

To create a string from a local file see this blackberry forum entry: Open txt file from mediacard
Assuming you want to use the data within the XML, I would recommend using a XML parser rather than string manipulation. The following links should get you going with XML parsers and explain some of the trade-offs:
Blackberry How To - Use the XML Parser
Parsing XML in J2ME
Add XML parsing to your J2ME applications
If, however, you have any say about the format used JSON might be a good alternative. JSON is easy for machines to parse (thus using fewer resources) and it's human readable.

I have found using a SAXParser and subclassing DefaultHandler has worked well. Allows to go element by element.

Related

Node.js - Download .docx file exported as html from onedrive using microsoftgraph api call

When making a call like this example from here
client
.api('/me/drive/root/children/Doc.docx/content')
.getStream((err, downloadStream) => {
let writeStream = fs.createWriteStream('Mydoc.docx');
downloadStream.pipe(writeStream).on('error', console.log);
});
It works as expected. What I want is to get the .docx file as html. Is there any way to download it in html format? Or do I have to save the file and then try to export it to html. Thanks
Word Documents (.docx) do not use HTML, they use Office Open XML (OOXML). Technically they are a zipped package that contains several elements along with the raw OOXML of the document.
OneDrive itself does not provide any document conversion tools, it is just the cloud storage the document is stored in.
In order to convert a document from one format to another (OOXML to HTML for example), you'll need to use a 3rd party tool or service for that purpose. I'd suggest taking a look as Aspose. They offer a slew of file format conversion tools including one for Word. I've had a number of developers report good results using their Aspose Cloud services as well.
You can add the query parameter format=html to download in html format but supposedly you have to use the beta endpoint.

How to read pdf and extract text from pdf in symfony1.1?

I am working on Symfony-1.1 in an existing project. How can I read pdf files and extract text from them?
It's not a Symfony 1.1 related question, actually. It's a PHP one. There several libraries to handle PDFs in PHP. Following are some suggestions.
https://github.com/smalot/pdfparser
http://pastebin.com/dvwySU1a
http://www.pdflib.com/
If you just need to parse pdf in anyway and then process the text in PHP, you can also consider using a java library like the following.
http://pdfbox.apache.org/ (Is there a PDF parser for PHP?)

Puppet: Is there any way to parse XML in puppet template file

I am now using json data to fill my puppet templates. I want know that is there any way to parse a xml inside puppet template.
Also there is an additional issue. I am using external facts to take data from the agent to the master. Basically what I am doing is taking my data as a string and parse it to a json inside my template. I want to parse my string into xml ( I will send data in correct format).
Regards,
Malintha
Puppet has no native XML support.
As for the eRuby templates - those appear to require external libraries to deserialize XML.

Can't get the F# Word typeprovider to work for custom Word documents

I've downloaded the FSharp 3 Sample Pack and tried out the sample for the Word documents typeprovider which works fine in the TestScript.fsx file when using the provided sample document (AA.docx). But when I try using it with a different Word document it doesn't work i.e. no properties are generated on the type provider instance (Person, MyCompany etc.). Even if I create a new document and copy the contents of AA.docx to it (keeping source formatting) it doesn't work. What could be the issue?
The word type provider uses the Open xML API. The same word content can have different XML representation at backend. I'd suggest you to download the Open XML SDK and use the tool to visualize its content.

Parsing XML in Objective-C

I am creating an IOS app , I have to read the Rss feeds from the specified url and Display only the specified contents ti the user , how do i parse the XML contents ? Is there any similar API to JSoup present in Xcode ?
I would recommend to use the TBXMLParser: https://github.com/71squared/TBXML .
It's a light-weight XML parser designed for iOS.
However, you can check in http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project the different options you have depending on the type of document you're planning to parse.

Resources