Guest User

Untitled

a guest
Jul 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public override bool Read()
  2. {
  3. bool status = base.Read();
  4. if( status )
  5. {
  6. if( base.NodeType == XmlNodeType.Element )
  7. {
  8. dowrite = false;
  9. // Got a node with prefix. This must be one of those "<o:p>"
  10. // or something else. Skip this node entirely. We want prefix-
  11. // less nodes so that the resultant XML requires no namespace.
  12. foreach (string line in AllowedTags)
  13. {
  14. if (base.Name == line ||
  15. (base.Name == "html" && first == false))
  16. {
  17. dowrite = true;
  18. first = true;
  19. }
  20. }
  21.  
  22. if( base.Name.IndexOf(':') > 0 )
  23. dowrite=false;
  24.  
  25. if(!dowrite)
  26. base.Skip();
  27. }
  28. }
  29. return status;
  30. }
Add Comment
Please, Sign In to add comment