• Home
  • Raw
  • Download

Lines Matching refs:xml

601     *xml;  in FileToXML()  local
646 xml=(char *) AcquireQuantumMemory(quantum,sizeof(*xml)); in FileToXML()
647 for (i=0; xml != (char *) NULL; i+=count) in FileToXML()
649 count=read(file,xml+i,quantum); in FileToXML()
658 xml=(char *) RelinquishMagickMemory(xml); in FileToXML()
661 xml=(char *) ResizeQuantumMemory(xml,i+quantum+1,sizeof(*xml)); in FileToXML()
667 if (xml == (char *) NULL) in FileToXML()
671 xml=(char *) RelinquishMagickMemory(xml); in FileToXML()
675 xml[length]='\0'; in FileToXML()
676 return(xml); in FileToXML()
679 xml=(char *) NULL; in FileToXML()
681 xml=(char *) AcquireQuantumMemory(length+MagickPathExtent,sizeof(*xml)); in FileToXML()
682 if (xml == (char *) NULL) in FileToXML()
690 (void) memcpy(xml,map,length); in FileToXML()
698 count=read(file,xml+i,(size_t) MagickMin(length-i,(size_t) MAGICK_SSIZE_MAX)); in FileToXML()
709 xml=(char *) RelinquishMagickMemory(xml); in FileToXML()
713 xml[length]='\0'; in FileToXML()
717 xml=(char *) RelinquishMagickMemory(xml); in FileToXML()
718 return(xml); in FileToXML()
1370 static char *ParseEntities(char *xml,char **entities,int state) in ParseEntities() argument
1396 p=xml; in ParseEntities()
1397 q=xml; in ParseEntities()
1398 for ( ; *xml != '\0'; xml++) in ParseEntities()
1399 while (*xml == '\r') in ParseEntities()
1401 *(xml++)='\n'; in ParseEntities()
1402 if (*xml == '\n') in ParseEntities()
1403 (void) memmove(xml,xml+1,strlen(xml)); in ParseEntities()
1405 for (xml=p; ; ) in ParseEntities()
1407 while ((*xml != '\0') && (*xml != '&') && ((*xml != '%') || in ParseEntities()
1408 (state != '%')) && (isspace((int) ((unsigned char) *xml) == 0))) in ParseEntities()
1409 xml++; in ParseEntities()
1410 if (*xml == '\0') in ParseEntities()
1420 if ((state != 'c') && (strncmp(xml,"&#",2) == 0)) in ParseEntities()
1425 if (xml[2] != 'x') in ParseEntities()
1426 c=strtol(xml+2,&entity,10); /* base 10 */ in ParseEntities()
1428 c=strtol(xml+3,&entity,16); /* base 16 */ in ParseEntities()
1434 xml++; in ParseEntities()
1438 *(xml++)=c; in ParseEntities()
1448 *xml=(char) ((0xFF << (7-i)) | (c >> (6*i))); in ParseEntities()
1449 xml++; in ParseEntities()
1453 *xml=(char) (0x80 | ((c >> (6*i)) & 0x3F)); in ParseEntities()
1454 xml++; in ParseEntities()
1457 (void) memmove(xml,strchr(xml,';')+1,strlen(strchr(xml,';'))); in ParseEntities()
1460 if (((*xml == '&') && ((state == '&') || (state == ' ') || in ParseEntities()
1461 (state == '*'))) || ((state == '%') && (*xml == '%'))) in ParseEntities()
1468 (strncmp(xml+1,entities[i],strlen(entities[i])) != 0)) in ParseEntities()
1471 xml++; in ParseEntities()
1479 entity=strchr(xml,';'); in ParseEntities()
1481 ((length-1L) >= (size_t) (entity-xml))) in ParseEntities()
1483 offset=(ssize_t) (xml-p); in ParseEntities()
1508 xml=p+offset; in ParseEntities()
1509 entity=strchr(xml,';'); in ParseEntities()
1512 (void) memmove(xml+length,entity+1,strlen(entity)); in ParseEntities()
1513 (void) memcpy(xml,entities[i],length); in ParseEntities()
1518 (isspace((int) ((unsigned char) *xml) != 0))) in ParseEntities()
1519 *(xml++)=' '; in ParseEntities()
1521 xml++; in ParseEntities()
1528 for (xml=p; *xml != '\0'; xml++) in ParseEntities()
1533 i=(ssize_t) strspn(xml,accept); in ParseEntities()
1535 (void) memmove(xml,xml+i,strlen(xml+i)+1); in ParseEntities()
1536 while ((*xml != '\0') && (*xml != ' ')) in ParseEntities()
1537 xml++; in ParseEntities()
1538 if (*xml == '\0') in ParseEntities()
1541 xml--; in ParseEntities()
1542 if ((xml >= p) && (*xml == ' ')) in ParseEntities()
1543 *xml='\0'; in ParseEntities()
1548 static void ParseCharacterContent(XMLTreeRoot *root,char *xml, in ParseCharacterContent() argument
1558 xml[length]='\0'; in ParseCharacterContent()
1559 xml=ParseEntities(xml,root->entities,state); in ParseCharacterContent()
1562 (void) ConcatenateString(&xml_info->content,xml); in ParseCharacterContent()
1563 xml=DestroyString(xml); in ParseCharacterContent()
1569 xml_info->content=xml; in ParseCharacterContent()
1587 static MagickBooleanType ValidateEntities(char *tag,char *xml, in ValidateEntities() argument
1598 for ( ; ; xml++) in ValidateEntities()
1600 while ((*xml != '\0') && (*xml != '&')) in ValidateEntities()
1601 xml++; in ValidateEntities()
1602 if (*xml == '\0') in ValidateEntities()
1604 if (strncmp(xml+1,tag,strlen(tag)) == 0) in ValidateEntities()
1608 (strncmp(entities[i],xml+1,strlen(entities[i])) == 0)) in ValidateEntities()
1616 static void ParseProcessingInstructions(XMLTreeRoot *root,char *xml, in ParseProcessingInstructions() argument
1628 target=xml; in ParseProcessingInstructions()
1629 xml[length]='\0'; in ParseProcessingInstructions()
1630 xml+=strcspn(xml,XMLWhitespace); in ParseProcessingInstructions()
1631 if (*xml != '\0') in ParseProcessingInstructions()
1633 *xml='\0'; in ParseProcessingInstructions()
1634 xml+=strspn(xml+1,XMLWhitespace)+1; in ParseProcessingInstructions()
1638 xml=strstr(xml,"standalone"); in ParseProcessingInstructions()
1639 if ((xml != (char *) NULL) && in ParseProcessingInstructions()
1640 (strncmp(xml+strspn(xml+10,XMLWhitespace "='\"")+10,"yes",3) == 0)) in ParseProcessingInstructions()
1687 root->processing_instructions[i][j]=ConstantString(xml); in ParseProcessingInstructions()
1691 static MagickBooleanType ParseInternalDoctype(XMLTreeRoot *root,char *xml, in ParseInternalDoctype() argument
1714 for (xml[length]='\0'; xml != (char *) NULL; ) in ParseInternalDoctype()
1716 while ((*xml != '\0') && (*xml != '<') && (*xml != '%')) in ParseInternalDoctype()
1717 xml++; in ParseInternalDoctype()
1718 if (*xml == '\0') in ParseInternalDoctype()
1720 if ((strlen(xml) > 9) && (strncmp(xml,"<!ENTITY",8) == 0)) in ParseInternalDoctype()
1725 if (strspn(xml+8,XMLWhitespace) == 0) in ParseInternalDoctype()
1727 xml+=strspn(xml+8,XMLWhitespace)+8; in ParseInternalDoctype()
1728 c=xml; in ParseInternalDoctype()
1729 n=xml+strspn(xml,XMLWhitespace "%"); in ParseInternalDoctype()
1732 xml=n+strcspn(n,XMLWhitespace); in ParseInternalDoctype()
1733 if (*xml == '\0') in ParseInternalDoctype()
1735 *xml=';'; in ParseInternalDoctype()
1736 v=xml+strspn(xml+1,XMLWhitespace)+1; in ParseInternalDoctype()
1744 xml=strchr(xml,'>'); in ParseInternalDoctype()
1757 xml++; in ParseInternalDoctype()
1758 *xml='\0'; in ParseInternalDoctype()
1759 xml=strchr(v,q); in ParseInternalDoctype()
1760 if (xml != (char *) NULL) in ParseInternalDoctype()
1762 *xml='\0'; in ParseInternalDoctype()
1763 xml++; in ParseInternalDoctype()
1781 if (strncmp(xml,"<!ATTLIST",9) == 0) in ParseInternalDoctype()
1786 t=xml+strspn(xml+9,XMLWhitespace)+9; in ParseInternalDoctype()
1795 xml=t+strcspn(t,XMLWhitespace ">"); in ParseInternalDoctype()
1796 if (*xml == '>') in ParseInternalDoctype()
1798 *xml='\0'; in ParseInternalDoctype()
1804 while ((*(n=xml+strspn(xml+1,XMLWhitespace)+1) != '\0') && in ParseInternalDoctype()
1807 xml=n+strcspn(n,XMLWhitespace); in ParseInternalDoctype()
1808 if (*xml != '\0') in ParseInternalDoctype()
1809 *xml='\0'; in ParseInternalDoctype()
1818 xml+=strspn(xml+1,XMLWhitespace)+1; in ParseInternalDoctype()
1819 c=(char *) (strncmp(xml,"CDATA",5) != 0 ? "*" : " "); in ParseInternalDoctype()
1820 if (strncmp(xml,"NOTATION",8) == 0) in ParseInternalDoctype()
1821 xml+=strspn(xml+8,XMLWhitespace)+8; in ParseInternalDoctype()
1822 xml=(*xml == '(') ? strchr(xml,')') : xml+ in ParseInternalDoctype()
1823 strcspn(xml,XMLWhitespace); in ParseInternalDoctype()
1824 if (xml == (char *) NULL) in ParseInternalDoctype()
1832 xml+=strspn(xml,XMLWhitespace ")"); in ParseInternalDoctype()
1833 if (strncmp(xml,"#FIXED",6) == 0) in ParseInternalDoctype()
1834 xml+=strspn(xml+6,XMLWhitespace)+6; in ParseInternalDoctype()
1835 if (*xml == '#') in ParseInternalDoctype()
1837 xml+=strcspn(xml,XMLWhitespace ">")-1; in ParseInternalDoctype()
1843 if (((*xml == '"') || (*xml == '\'')) && in ParseInternalDoctype()
1844 ((xml=strchr(v=xml+1,*xml)) != (char *) NULL)) in ParseInternalDoctype()
1845 *xml='\0'; in ParseInternalDoctype()
1893 if (strncmp(xml, "<!--", 4) == 0) in ParseInternalDoctype()
1894 xml=strstr(xml+4,"-->"); in ParseInternalDoctype()
1896 if (strncmp(xml,"<?", 2) == 0) in ParseInternalDoctype()
1898 c=xml+2; in ParseInternalDoctype()
1899 xml=strstr(c,"?>"); in ParseInternalDoctype()
1900 if (xml != (char *) NULL) in ParseInternalDoctype()
1902 ParseProcessingInstructions(root,c,(size_t) (xml-c)); in ParseInternalDoctype()
1903 xml++; in ParseInternalDoctype()
1907 if (*xml == '<') in ParseInternalDoctype()
1908 xml=strchr(xml,'>'); in ParseInternalDoctype()
1910 if ((*(xml++) == '%') && (root->standalone == MagickFalse)) in ParseInternalDoctype()
1955 MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception) in NewXMLTree() argument
1990 if ((xml == (const char *) NULL) || (strlen(xml) == 0)) in NewXMLTree()
1997 length=strlen(xml); in NewXMLTree()
1998 utf8=ConvertUTF16ToUTF8(xml,&length); in NewXMLTree()
2763 *xml; in XMLTreeInfoToXML() local
2794 xml=AcquireString((char *) NULL); in XMLTreeInfoToXML()
2820 xml=(char *) ResizeQuantumMemory(xml,extent,sizeof(*xml)); in XMLTreeInfoToXML()
2821 if (xml == (char *) NULL) in XMLTreeInfoToXML()
2822 return(xml); in XMLTreeInfoToXML()
2824 length+=FormatLocaleString(xml+length,extent,"<?%s%s%s?>\n",q, in XMLTreeInfoToXML()
2832 xml=XMLTreeTagToXML(xml_info,&xml,&length,&extent,0,root->attributes); in XMLTreeInfoToXML()
2854 xml=(char *) ResizeQuantumMemory(xml,extent,sizeof(*xml)); in XMLTreeInfoToXML()
2855 if (xml == (char *) NULL) in XMLTreeInfoToXML()
2856 return(xml); in XMLTreeInfoToXML()
2858 length+=FormatLocaleString(xml+length,extent,"\n<?%s%s%s?>",q, in XMLTreeInfoToXML()
2863 return((char *) ResizeQuantumMemory(xml,length+1,sizeof(*xml))); in XMLTreeInfoToXML()