Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML from IWebBrowser

Posted on 2006-06-30
8
Medium Priority
?
192 Views
Last Modified: 2013-11-20
The IWebBrowser is currently displaying an XML result page.  How do I retrieve the XML string from the document?
0
Comment
Question by:ramrocket
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 

Author Comment

by:ramrocket
ID: 17020625
CComBSTR bstrInnerHTML;
pBody->get_outerHTML(&bstrInnerHTML);
CString result = W2A(bstrInnerHTML);

When I get the response from from an http request, I get in the result:

<html>...<?xml version="1.0" encoding="utf-8" ?>...</html>

How do I get rid of html tags and just get the xml string???
0
 
LVL 11

Expert Comment

by:KurtVon
ID: 17026285
get_innerHTML isn't working?  You may have to navigate to the specific element in the XML (I can't tell from what you've posted).

Another possibility is to reparse the string into a DOMDocument and then use standard XML navigation to get to the part you want.

Hope this helps.
0
 

Author Comment

by:ramrocket
ID: 17030668
thanks Kurt, I've figured it out.  I have to write a little parsing function and painfully parse the string in memory to get rid of hltml tags.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Expert Comment

by:KurtVon
ID: 17031758
I'm surprised you can't trim the string before the start and after the end of the XML tags, then feed the string to a DOMDocument to get it parsed automatically.
0
 

Author Comment

by:ramrocket
ID: 17031808
it is because html tags occurs not only between html block but also between xml block.  
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17371184
PAQed with points refunded (100)

CetusMOD
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question