Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to add SelectAll in CFileDialog Pin
David Crow13-Dec-07 4:29
David Crow13-Dec-07 4:29 
GeneralRe: How to add SelectAll in CFileDialog Pin
santhoshv8413-Dec-07 17:15
santhoshv8413-Dec-07 17:15 
GeneralRe: How to add SelectAll in CFileDialog Pin
David Crow14-Dec-07 2:55
David Crow14-Dec-07 2:55 
General"rich text file(RTF)" text extracting using CRichViewEdit Pin
CodingLover12-Dec-07 17:09
CodingLover12-Dec-07 17:09 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
CPallini12-Dec-07 21:37
mveCPallini12-Dec-07 21:37 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
CodingLover12-Dec-07 21:52
CodingLover12-Dec-07 21:52 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
CPallini12-Dec-07 22:01
mveCPallini12-Dec-07 22:01 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
CodingLover12-Dec-07 22:27
CodingLover12-Dec-07 22:27 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
CodingLover12-Dec-07 23:56
CodingLover12-Dec-07 23:56 
GeneralRe: "rich text file(RTF)" text extracting using CRichViewEdit Pin
David Crow13-Dec-07 4:48
David Crow13-Dec-07 4:48 
QuestionLooking for a suitable zip lib which can access subdirectory Pin
Peter, Chan12-Dec-07 16:40
Peter, Chan12-Dec-07 16:40 
GeneralRe: Looking for a suitable zip lib which can access subdirectory Pin
kanduripavan4-Apr-08 20:23
kanduripavan4-Apr-08 20:23 
GeneralStructure as a proc in a DLL Pin
ForNow12-Dec-07 13:33
ForNow12-Dec-07 13:33 
AnswerRe: Structure as a proc in a DLL Pin
CPallini12-Dec-07 21:45
mveCPallini12-Dec-07 21:45 
GeneralRe: Structure as a proc in a DLL Pin
ForNow12-Dec-07 21:56
ForNow12-Dec-07 21:56 
QuestionAdd GIF file as resource? Pin
DigiFaith12-Dec-07 11:31
DigiFaith12-Dec-07 11:31 
AnswerRe: Add GIF file as resource? Pin
Don Box12-Dec-07 17:47
Don Box12-Dec-07 17:47 
AnswerRe: Add GIF file as resource? Pin
KarstenK13-Dec-07 4:46
mveKarstenK13-Dec-07 4:46 
GeneralWinerror 234 Pin
RomTibi12-Dec-07 10:36
RomTibi12-Dec-07 10:36 
GeneralRe: Winerror 234 Pin
CPallini12-Dec-07 10:47
mveCPallini12-Dec-07 10:47 
GeneralRe: Winerror 234 Pin
RomTibi13-Dec-07 8:01
RomTibi13-Dec-07 8:01 
GeneralRe: Winerror 234 Pin
CPallini13-Dec-07 21:12
mveCPallini13-Dec-07 21:12 
GeneralRe: Winerror 234 Pin
RomTibi14-Dec-07 6:08
RomTibi14-Dec-07 6:08 
GeneralXML Reading/Skipping comments question. Pin
Maximilien12-Dec-07 10:16
Maximilien12-Dec-07 10:16 
(I don't know if I should post this in the XML forum or here, I flipped the coin and it falls here)

I have a comment in in a section of an XML like :

<Command id="myCommand">
  <!-- ... this is a comment -->
  <Data name="X1"></Data>
  <Data name="X2"></Data>
  <Data name="X3"></Data>
  <Data name="X4"></Data>
  <Data name="X5"></Data>
</Command>


I parse the XML with something like that :

MSXML2::IXMLDOMNodeListPtr	pXMLNodeList;
long lCount;
HRESULT hr;
hr = pXMLNode->get_childNodes(&pXMLNodeList);
hr = pXMLNodeList->get_length(&lCount);
if (FAILED(hr))
{
  ASSERT( 0 );
  return;
}

for (int i = 0; i < lCount; i++)
{
  MSXML2::IXMLDOMNodePtr pXMLNode;
  hr = pXMLNodeList->get_item(i, &pXMLNode);
  if (FAILED(hr))
  {
    ASSERT( 0 );
    return;
  }

  CString stmp = MyParser::GetnodeName(pXMLNode );
  if ( stmp.Compare( "Data" ) == 0 )
  {
    TRACE("Tata\n");
  }
}


When I read the count with pXMLNodeList->get_length(&lCount); it returns 6, the 5 <Data> and the comment line.

When I do the MyParser::GetnodeName(pXMLNode ); for the comment line it returns "#comment"

I'm not certain if it's normal and if there is a better when than doing a Compare to skip the comment line ?

Thanks.

Max.




Maximilien Lincourt
Your Head A Splode - Strong Bad

GeneralRe: XML Reading/Skipping comments question. Pin
George L. Jackson12-Dec-07 12:59
George L. Jackson12-Dec-07 12:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.