private void LoadXPathDesigner(object sender, System.EventArgs e) { XmlXpathDialog dialog = new XmlXpathDialog(); bool displayDialog = false; if ( _currentResponse != null ) { string s; if ( _currentResponse.GetHtmlXml.Length > 0 ) { s = _currentResponse.GetHtmlXml; } else { s = this.parser.GetParsableString(_currentResponse.HttpBody); } dialog.XmlString = s; displayDialog = true; dialog.Show(); } if ( displayDialog == false ) { MessageBox.Show("The HTML cannot be transformed to XML. Use the RegEx Query dialog instead.", AppLocation.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void mnuXPathQueryDialog_Click(object sender, System.EventArgs e) { XmlXpathDialog dialog = new XmlXpathDialog(); bool displayDialog = false; if ( currentWebResponse != null ) { if ( currentWebResponse.GetHtmlXml.Length > 0 ) { dialog.XmlString = currentWebResponse.GetHtmlXml; dialog.XPathLocation = _translatedDomXpath; displayDialog = true; dialog.Show(); } else { string s = ParseHTML(); if ( s != string.Empty ) { dialog.XmlString = s; displayDialog = true; dialog.XPathLocation = _translatedDomXpath; dialog.Show(); } } } if ( displayDialog == false ) { MessageBox.Show("The HTML cannot be transformed to XML. Use the RegEx Query dialog instead.", AppLocation.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }