How can I get the contents of an object of Document (XMLDOM) in a string variable?

Hello

I created an XML document by using the Document and XMLElement classes and now I need to get the XML object and a string variable, so I can send by e-mail.

I'm on 4.5 JDE

Help!

Hello

Unlike some other posts, there is a solution.

Document myDocument = pdocXMLDocument;  / * This is the document that you created that you want to convert to a string

ByteArrayOutputStream OS = new ByteArrayOutputStream(); / * where you want the XML to go * /;
XMLWriter writer = new XMLWriter (os);

configure as you want using one or more of:
writer.setPrettyPrint (); or setPrintCompressedOutput();
writer.setPrintCompressedOutput ();
writer.setPreserveSpacing ();
writer.setExpandingEntities (boolean);
writer.setEntityResolver (EntityResolver);
try {}
DOMInternalRepresentation.parse (pdocXMLDocument, writer);
String myXML = os.toString ();        THIS IS THE STRING
}
catch (Exception ex) {}
}

Tags: BlackBerry Developers

Similar Questions

  • How can I get the content of a node TreeField?

    I need to keep the contents of a TreeField.

    I believe that the only way to do that is to keep the content of the tree instead of the tree itself.

    However, I can't drive how to get the content of a node.

    I found the method to get the node ID, but nothing to get the string value that contains the node.

    Any suggestions?

    Thank you.

    the objects contained in a treefield are known cookies.
    You can use http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TreeField.html#ge...
    to retrieve one for the node id.

  • How can I get the Adobe tool to sign a document?

    How to get to the Adobe tool to sign a document?

    Hi rosemariej7822182,

    See this KB document for help sign a PDF in Adobe Acrobat Reader.

    Kind regards
    Nicos

  • How can I get the "remove all" in my "all Documents" in Chrome

    How to clean my "Documents" in Chrome

    Sorry, but your question has nothing to do with Apple networks. I suggest that you contact Google on how to use their Chrome browser.

  • How can I get the airplay icon to appear? Changing the settings of firewall does not work

    How can I get the airplay icon to appear? Changing the settings of firewall does not work

    Hello Drjoe378,

    I understand that you do not see the AirPlay icon in iTunes on your Mac. If you have verified that your firewall is disabled or that the problem occurs regardless of the status of your firewall, there is a little more that can help return your ability to connect to AirPlay devices.

    1. Make sure you have the latest version of iTunes and Apple TV software.
    2. Connect your computer and other devices on the same network Wi - Fi. If you are using Ethernet, connect the two devices on the same router or hub. If you use the Wi - Fi and Ethernet, plug your device AirPlay the same router that your computer uses for Wi - Fi.
    3. Restart your computer, device AirPlay and network router.
    4. Because some Airplay devices include a power switch for AirPlay option, look for the option in the settings and make sure that the feature is enabled. Refer to the user guide of the device for more information.

    Use AirPlay to stream content from iTunes on your computer wireless
    https://support.Apple.com/en-us/HT202809

    All my best.

  • How can I get the wwe, Inc. on the slate tablet app 7?

    How can I get the wwe, Inc. app for my hp slate tablet 7?  Some things said not compatible.

    Applications that require a GPS chip in a device won't like the entry level of Slate7 tablet as it does not.  To work around the problem, you will need to 'load side' the program of another Android device that can run it.  She is called extract APK.

    Extraction of the APK is not officially approved by HP. If an application is not available in a specific area which is a restriction that the developer has put on the application. Such a restriction could be due to the licensing of content.

    There are two main steps in order to extract the APK-

    (1) extract the application of another Android device, or download the APK file directly. If you download the APK file also, please be very confident of the Web site. Because you will be "forcing" the application to install and don't not download through Google, it is possible the application has been infected by malware or otherwise damaged.

    To perform step 1, first install the application on another Android device, and also to install an "APK Extractor" application. (there are several to choose from and available for free in the game of Google store).
    Once the application is extracted, copy the file to a MicroSD card, or use another means of transfer for example transfer or by e-mail.

    Insert the MicroSD card into your 7 Slate, or download the file.
    You may need to install a file browser to locate the file on your tab 7. These are also available in the store from game Google free.

    You must change a setting of security on your tab 7; Click settings, security and place a check in "unknown Sources allow installation of applications from unknown sources. You will get a warning about the potential of malicious software by changing this setting.

    Once the security setting has been changed, find the APK file and simply "click" on it to open it. It will install everything as it was downloading from the game store.

    I will state some things well-
    (1) this process is not approved by HP. I am a volunteer here and not an official representative of HP.
    (2) If a request is blocked in your area, then installation can cause problems or even violate certain laws or license.
    (3) download an APK on a suspicious Web site could introduce viruses/spyware/malware or other undesirable behaviors. Do not download APKs for files that are not free Google game like this would be piracy.
    (4) installation of an APK that "requires" GPS may not work fully, although in many cases, you can manually enter in your location and it will work.

    WyreNut

  • How can I get the digital power meter?

    How can I get the digital power meter?

    I use a method similar to the example below to measure the market factor using the inputs of a multifunction data acquisition meter.  If the duty cycle is 0% or 100% for a given period, DAQ reading times out and returns an error.  In this case, I would get the digital state of the counter of entry so I can put as cycle to 0% or 100%.  I want to do it without knowing the digital port and line the entrance of counter... for example I would like to continue referencing DAQ/ctrX since I already have this information.

    The application uses an M series: PXI-6229 DAQ and LabVIEW 2011 to make a system customized for VeriStand.

    https://decibel.NI.com/content/docs/doc-12396

    For the moment I wired the block diagram to add a case structure to check the meter ID and string constants to set the identifier of digital input, as they share the physical connection.  As much as I can say that makes the specific code for the PXI-6229 (or any DAQ with only two counters that share connections with p2.1 and p) 1.4

    I have attached the VI sub.

    When the device is used with a different data acquisition, I can add the connection and/or separate control.  Looks like at least one will be necessary given that the meter can only detect the edges... I think it was the piece of information I needed.

    Thanks for your help!

  • When I go to a favorite websight how can I get the user id and the password to open the view without having to put in me? Barry was soon

    When I go to a favorite websight how can I get the user id and the password to open the view without having to put in me? Barry was soon

    Hi Barry,.

    Please contact Microsoft Community.

    It would be great if you can answer the following question:

    What browser you use on the computer?

    If you are using Internet explorer, I suggest you to follow these steps to turn on the AutoComplete feature and check if it helps:

    (a) open Internet Explorer.

    (b) click on the Tools button and then click on Internet Options.

    (c) click on the content tab.

    (d) under AutoComplete , click settings.

    (e) check the address bar, Forms, usernames and passwords on formsand ask me before saving passwords check boxes.

    (f) click OKand then click OK again.

    Let us know if this can help, and if you need further assistance.

  • How can I update the content of my application

    Hello everyone I am new to phone gap and I'm creating an app from Gallery News and events for iPhone and android using the gap app builder phone. After I design the app in adobe Dreamweaver and publish the application how can I modify the content of news and Live Gallery to the user who already download my application... Please help thanks

    You should have a backend (your own server or some 3rd party) where you can manage the new data.

    The backend should provide Web services with the data (JSON or XML).

    And then, in your application, you must use calls XHR (AJAX) for Web services to get the data, analyze, and display in your application.

  • How can I get the messages appear when sent even if my phone is locked. I only get messages across when I activate the phone

    How can I get the messages appear when sent even if my phone is locked. I only get messages across when I activate the phone

    Settings > Notifications > Messages > display on the lock screen

  • How can I get the iMovie video files in the photo library?

    How can I get the video files of "iMovie - bibliotek.imovielibrary" in the photo library?

    Is to select your library from the libraries pane and choose my brackets at the top of the screen. Then select the clips you want and share file on the desktop. Then import in photos.

  • My update to Apple Watch has suspended how can I get the update?

    My update to Apple Watch has suspended, how can I get the update?

    What do you mean by "break"?

  • How can I get the AirPort Express 1 utility generation? I lost mine.

    How can I get the AirPort Express, the utility of 1st generation? I lost mine.

    Open the App Store on your device, then press Search at the bottom of the screen.

    Then type: airport utility in the search field of the screen top.

  • How can I get the update iOS 9.3.5?

    How can I get the update iOS 9.3.5?

    Settings > general > software update

  • FireFox is no longer crash recovery of open tabs. Management of tab has changed. How can I get the old behavior?

    All my old tabs are missing after a crash. I chose "view my tabs, windows and last time ', like the start option. Many unwanted changes in tab management happened recently. For example when I close a tab in a window of the two tab, I see a blank screen (see picture). Preview display seems to be broken (see attachment). How can I get the old behaviour back?

    After researching the issue, it seems that the problem was a problem of NoScript configuration. After restoring NoScript to the default values, the tab number disappeared.

    Thanks for your help.

    MELL-

    (~ J99) Also note

    mellpell said

    Looks like it's a known problem with Image Tweek:
    http://forums.mozillazine.org/viewtopic.php?p=14029673#p14029673
    https://github.com/CAFxX/ImageTweak/issues/37
    https://github.com/CAFxX/ImageTweak/issues/40

Maybe you are looking for

  • I can't find the bookmarks organize and/or export bookmarks from Safari with Firefox 4

    I can't find the bookmarks organize and/or export bookmarks from Safari with Firefox 4. View that all bookmarks does not help.

  • Remove toolbar icon

    I got "Customize toolbar" open & I accidently added the 'Home' icon in the toolbar, but want more.  I can't find a way to remove it.  It does not have to hold down the control key and tap the icon at the top of the page.  The 'home' icon does not.  A

  • ProBook 4720 s does not detect the SD card inserted

    I get no response when a SD card snaps, but 8 GB Transcend card is recognized very well of my little netbook from Toshiba. This is the first time I tried a card in this HP, although I got it a few months. Running Win 7 Pro 32-bit.  BIOS HP 68AZZ worm

  • recently purchased Microsoft headset - pkg contained no instructions CD - WHYl CD?

    statement of helmet X1OLP sheet is Apple 'Sony' instructions imply an installation CD - NO CD package - what do I do now?

  • Images in gray

    Have a day of nightmare! Have lost my pictures after I tried to stop a mobile sync (which I didn't) in mid flow that he used to take hours. Should then stop LR6 and shut down the computer as is stuck.On reopening pictures (512 images) show in the col