equal
deleted
inserted
replaced
|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Text node functions |
|
15 // |
|
16 |
|
17 #include <xml/dom/xmlengtext.h> |
|
18 #include "xmlengdomdefs.h" |
|
19 #include <stdapis/libxml2/libxml2_parserinternals.h> |
|
20 |
|
21 EXPORT_C TBool TXmlEngTextNode::IsElementContentWhitespace() const |
|
22 { |
|
23 // The code is taken and adapted from xmlIsBlankNode: |
|
24 const xmlChar *cur; |
|
25 xmlNodePtr node = LIBXML_NODE; |
|
26 if (!node) |
|
27 return EFalse; |
|
28 |
|
29 if (!(node->content)) |
|
30 return ETrue; |
|
31 cur = node->content; |
|
32 while (*cur != 0) |
|
33 { |
|
34 if (!IS_BLANK_CH(*cur)) |
|
35 return EFalse; |
|
36 cur++; |
|
37 } |
|
38 return ETrue; |
|
39 } |